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: (view raw, whole thread or download thread mbox)
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


-- 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 = '97223' and
year = 2008
and month < 5 and c.assoccand in ('P80003338', 'P80002801' ,
'S6OR00094' , 'S8OR00207')


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


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-2017 The PostgreSQL Global Development Group