Skip site navigation (1) Skip section navigation (2)

GRANT question

From: "Len Shapiro" <lenshap(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: GRANT question
Date: 2008-09-15 03:04:07
Message-ID: c5ee9b8a0809142004m3eba5814gcc8eec4117acbfd8@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
I am a user, len, and I own a schema, called fec.  cs386 is another user.

In psql 8.3.1 (server 8.3.3) I ran a shell script that included these statements


**BEGIN EXCERPTS  FROM SHELL SCRIPT

-- I seem to need to say this in every shell script, it doesn't 'stick'
SET search_path TO fec;

....

SELECT fecid, c.commid, occup, month, amount
INTO indivcl
FROM indiv i, comm c WHERE i.commid = c.commid and i.zip = '97223' and
year = 2008
and month < 5 and c.assoccand in ('P80003338', 'P80002801' ,
'S6OR00094' , 'S8OR00207')
;

...

GRANT SELECT ON candcl, commcl, indivcl, pascl TO cs386;

** END EXCERPTS FROM SHELL SCRIPT

When the user cs386 logs in via the GUI interface phpPgAdmin, s/he
cannot SELECT from indivcl.  Then len logs in via that GUI interface,
issues the statement
GRANT SELECT ON  indivcl TO cs386;
and then cs386 can access indivcl .

What is wrong?  Why did the effect of the "GRANT SELECT ..." statement
in the shell script not persist?  I'd appreciate any advice.

Len Shapiro

pgsql-novice by date

Next:From: Ridvan Lakas ng Bayan S. BaluyosDate: 2008-09-15 07:42:11
Subject: Invalid Byte Sequence for Encoding Error
Previous:From: Steve TDate: 2008-09-12 17:18:53
Subject: Re: Flat File unload/export/copy

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group