Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 92D4F632C2E for ; Wed, 21 Apr 2010 14:37:20 -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 36519-05 for ; Wed, 21 Apr 2010 17:37:07 +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 9049E62E522 for ; Wed, 21 Apr 2010 14:37:09 -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 o3LHasHi012083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Apr 2010 19:37:06 +0200 Subject: Re: Problem with insert related to different schemas From: Gonzalo Aguilar Delgado To: Tom Lane Cc: Scott Marlowe , pgsql-sql@postgresql.org In-Reply-To: <24030.1271863392@sss.pgh.pa.us> References: <1271233402.10390.5.camel@azul1> <1271781155.6136.57.camel@azul1> <15360.1271782885@sss.pgh.pa.us> <1271856300.29798.4.camel@azul1> <24030.1271863392@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Date: Wed, 21 Apr 2010 19:36:54 +0200 Message-ID: <1271871414.29798.5.camel@azul1> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.41 tagged_above=-10 required=5 tests=AWL=0.490, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/83 X-Sequence-Number: 34010 Hi Tom, This may be a clue... Will check El mié, 21-04-2010 a las 11:23 -0400, Tom Lane escribió: > Scott Marlowe writes: > > On Wed, Apr 21, 2010 at 7:25 AM, Gonzalo Aguilar Delgado > > wrote: > >> Maybe but I ran even grant all on schema public for this user to check > >> if this was the problem. > > > That doesn't do what you think it does. You need to grant on the actual object. > > The error he was getting was about permissions for the schema, though. > > One thought: if you're running any moderately recent version of PG, > the FK check query will be run as though by the owner of the table, > not whoever issued the INSERT. Maybe that user doesn't have the right > permissions? > > regards, tom lane >