Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8A0F563280A for ; Wed, 14 Apr 2010 05:35:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81941-03 for ; Wed, 14 Apr 2010 08:35:17 +0000 (UTC) X-Greylist: delayed 00:10:06.512825 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 BC0186325ED for ; Wed, 14 Apr 2010 05:35:17 -0300 (ADT) Received: from [192.168.10.100] (135.228.16.95.dynamic.jazztel.es [95.16.228.135]) (authenticated bits=0) by aguilardelgado.com (8.14.3/8.14.3/Debian-9ubuntu1) with ESMTP id o3E8NN67000709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 14 Apr 2010 10:25:08 +0200 Subject: Problem with insert related to different schemas From: Gonzalo Aguilar Delgado To: pgsql-sql@postgresql.org Content-Type: text/plain; charset="UTF-8" Date: Wed, 14 Apr 2010 10:23:22 +0200 Message-ID: <1271233402.10390.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.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/65 X-Sequence-Number: 33992 Hi Everyone, I've come along with a problem that appeared with latest version of Postgresql 8.4.2. I'm trying to insert a row in the analysis schema: INSERT INTO "analisys"."response_quality" ("uuid","id_survey_question","id_survey","id_survey_status","id_shop","survey_question_response","id_survey_answer","date_survey_answer") VALUES ('83968de5-eac7-4f52-bbec-7392a198f556',7,1,1,16,3,9987,'2009-12-01 00:00:00.000000 +01:00:00') But it fails because: ERROR: permiso denegado al esquema public LÍNEA 1: SELECT 1 FROM ONLY "public"."survey_question" x WHERE "id_su... ^ CONSULTA: SELECT 1 FROM ONLY "public"."survey_question" x WHERE "id_survey_question" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x ********** Error ********** ERROR: permiso denegado al esquema public Estado SQL:42501 Surely it may have something to do with foreign keys. But the user who executes this query has access to all foreign keys tables... Then why I'm receiving this error? Thank you in advance! NOTE: -- Table: analisys.response_quality -- DROP TABLE analisys.response_quality; CREATE TABLE analisys.response_quality ( uuid uuid NOT NULL, id_survey_question integer NOT NULL, id_survey integer NOT NULL, id_survey_status integer NOT NULL, id_shop integer NOT NULL, survey_question_response integer, id_survey_answer integer NOT NULL, date_survey_answer date NOT NULL, CONSTRAINT "primary" PRIMARY KEY (uuid, id_survey_answer, id_survey_question, date_survey_answer, id_shop, id_survey), CONSTRAINT question FOREIGN KEY (id_survey_question) REFERENCES survey_question (id_survey_question) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT survey FOREIGN KEY (id_survey) REFERENCES survey_surveys (id_survey) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH ( OIDS=FALSE );