Problem with insert related to different schemas - Mailing list pgsql-sql

From Gonzalo Aguilar Delgado
Subject Problem with insert related to different schemas
Date
Msg-id 1271233402.10390.5.camel@azul1
Whole thread Raw
Responses Re: Problem with insert related to different schemas
List pgsql-sql
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
dateNOT 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)
REFERENCESsurvey_question (id_survey_question) MATCH SIMPLE     ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT
surveyFOREIGN KEY (id_survey)     REFERENCES survey_surveys (id_survey) MATCH SIMPLE     ON UPDATE NO ACTION ON DELETE
NOACTION
 
)
WITH ( OIDS=FALSE
);




pgsql-sql by date:

Previous
From: Feixiong Li
Date:
Subject: How to max() make null as biggest value?
Next
From: Pavel Stehule
Date:
Subject: Re: How to max() make null as biggest value?