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

'SET LOCAL ROLE blah;' doesn't work?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: 'SET LOCAL ROLE blah;' doesn't work?
Date: 2007-06-28 17:01:44
Message-ID: 20070628170144.GN7531@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Greetings,

  At http://www.postgresql.org/docs/8.2/static/sql-set-role.html, we
  claim that 'SESSION and LOCAL modifiers act the same as for the
  regular SET command', but I don't think that's actually right...

networx=> set role postgres;
SET
networx*=# show role;
   role   
----------
 postgres
(1 row)

networx*=# reset role;
RESET
networx*=> set session role postgres;
SET
networx*=# show role;
   role   
----------
 postgres
(1 row)

networx*=# reset role;
RESET
networx*=> set local role postgres;
SET
networx*=> show role;
 role 
------
 none
(1 row)

networx*=> reset role;
RESET
networx*=> 

  Seems like we ignore requests to 'SET LOCAL ROLE blah'.  Note that
  above it's all in one transaction (indicated by the '*').  Might be
  something I'm misunderstanding tho, I suppose... :/  I checked, and
  after the 'set local role' I don't seem to have the permissions of
  that user (and still have the permissions of my prior user) too.

  My inclination is that the documentation is wrong, honestly...  I was
  originally looking into this area of the documentation to suggest that
  we explicitly mention somehow under 'reset all' that 'reset role' isn't
  done, and similairly that the documentation under 'set' doesn't apply
  for 'set role'.

  	Thanks,

		Stephen

Responses

pgsql-hackers by date

Next:From: Pavan DeolaseeDate: 2007-06-28 17:49:22
Subject: SetBufferCommitInfoNeedsSave and race conditions
Previous:From: Tom LaneDate: 2007-06-28 15:43:55
Subject: Re: self defined data type "with limit"?

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-06-28 18:41:28
Subject: Re: 'SET LOCAL ROLE blah;' doesn't work?
Previous:From: Andrew DunstanDate: 2007-06-28 16:55:09
Subject: Re: BUG #3415: plperl spi_exec_prepared variable undef value confusion

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