Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 9F585632FB6 for ; Wed, 21 Apr 2010 10:25:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 89632-09 for ; Wed, 21 Apr 2010 13:25:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from aguilardelgado.com (74.141.15.62.static.jazztel.es [62.15.141.74]) by mail.postgresql.org (Postfix) with ESMTP id AD68F6329B8 for ; Wed, 21 Apr 2010 10:25:15 -0300 (ADT) Received: from [192.168.10.100] (245.228.16.95.dynamic.jazztel.es [95.16.228.245]) (authenticated bits=0) by aguilardelgado.com (8.14.3/8.14.3/Debian-9ubuntu1) with ESMTP id o3LDP1ja010525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Apr 2010 15:25:10 +0200 Subject: Re: Problem with insert related to different schemas From: Gonzalo Aguilar Delgado To: pgsql-sql@postgresql.org Cc: Scott Marlowe , Tom Lane In-Reply-To: <15360.1271782885@sss.pgh.pa.us> References: <1271233402.10390.5.camel@azul1> <1271781155.6136.57.camel@azul1> <15360.1271782885@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Date: Wed, 21 Apr 2010 15:25:00 +0200 Message-ID: <1271856300.29798.4.camel@azul1> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.166 tagged_above=-10 required=5 tests=AWL=0.734, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/78 X-Sequence-Number: 34005 Hi Tom, > >> This is a select query. I don't think that's the right error message. > > > Yes, but IS the correct error message. > > The query being complained of appears to be a generated foreign key > checking query. It's not surprising it would appear in the context > of an insert. Yes, that's what I think too... > > > It appeared just after upgrading > > to 8.4 as 8.3 had no problem processing this query. > > You've either changed the permissions on schema public from what they > were in the old installation, or linked an FK constraint to the wrong > table. I see no reason to think there is either a bug or a version > difference here. Maybe but I ran even grant all on schema public for this user to check if this was the problem. About linking the wrong FK... Everything is posible. I have to take a look to them again and try isolate the problem. But I thought that it was a restriction of the jdbc driver used with postgresql. It looks like when you specify a schema for the query no other schema references are allowed... But I tried directly through the psql client and returned same error so it must be isolated at database level. Anyway, let me provide a test case. Thank you > > regards, tom lane >