Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 32EF9632EB6 for ; Tue, 20 Apr 2010 14:01:52 -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 54626-08 for ; Tue, 20 Apr 2010 17:01:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 6E93E6329DA for ; Tue, 20 Apr 2010 14:01:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o3KH1Pqd015361; Tue, 20 Apr 2010 13:01:25 -0400 (EDT) To: Gonzalo Aguilar Delgado cc: Scott Marlowe , pgsql-sql@postgresql.org Subject: Re: Problem with insert related to different schemas In-reply-to: <1271781155.6136.57.camel@azul1> References: <1271233402.10390.5.camel@azul1> <1271781155.6136.57.camel@azul1> Comments: In-reply-to Gonzalo Aguilar Delgado message dated "Tue, 20 Apr 2010 18:32:35 +0200" Date: Tue, 20 Apr 2010 13:01:25 -0400 Message-ID: <15360.1271782885@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.112 tagged_above=-10 required=5 tests=AWL=-0.202, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/72 X-Sequence-Number: 33999 Gonzalo Aguilar Delgado writes: >> 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. > 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. regards, tom lane