pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gonzalo Aguilar Delgado <gaguilar@level2crm.com>
To: pgsql-sql@postgresql.org
Subject: Problem with insert related to different schemas
Date: Wed, 14 Apr 2010 10:23:22 +0200
Message-ID: <1271233402.10390.5.camel@azul1> (raw)

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
);





view thread (10+ messages)  latest in thread

Message-ID: <1271233402.10390.5.camel@azul1>
Permalink:  ../1271233402.10390.5.camel@azul1/
Also on:    postgresql.org/message-id/1271233402.10390.5.camel@azul1

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gaguilar@level2crm.com
  Subject: Re: Problem with insert related to different schemas
  In-Reply-To: <1271233402.10390.5.camel@azul1>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox