Re: [GENERAL] Unable to select a table as postgres user

2015-10-30 Thread Joe Conway
On 10/30/2015 10:27 AM, rajan wrote: > The function is created as postgres user. > > And I get a permission denied error. If you want help solving this, I suggest you post a minimal, self contained test case (i.e. SQL statements) which anyone can run to reproduce your issue. HTH, Joe -- Crunc

Re: [GENERAL] Unable to select a table as postgres user

2015-10-30 Thread rajan
postgres owns the function Schema | public Name| testuserfunction Result data type| x Argument data types | Type| normal Security| definer Volatility | volatile Owner | postgres Language| plpgsql S

Re: [GENERAL] Unable to select a table as postgres user

2015-10-30 Thread rajan
The function is created as postgres user. And I get a permission denied error. -- View this message in context: http://postgresql.nabble.com/Unable-to-select-a-table-as-postgres-user-tp5872036p5872055.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pg

Re: [GENERAL] Unable to select a table as postgres user

2015-10-30 Thread Charles Clavadetscher
Hi What error do you get? - Permission denied or table does not exist? Latter would indicate a problem with the search_path and you should fully qualify the table name in the function body. - Did you create the function as postgres user? Bye Charles On 30/10/2015 07:56, rajan wrote: Yes.

Re: [GENERAL] Unable to select a table as postgres user

2015-10-30 Thread Pavel Stehule
2015-10-30 7:56 GMT+01:00 rajan : > Yes. I agree that the superuser cannot be restricted with any access. > > But my scenarios is, I am executing a function(VOLATILE SECURITY DEFINER) > using the superuser and it function fails with unable to select a > particular > table. > who owns this functio

Re: [GENERAL] Unable to select a table as postgres user

2015-10-29 Thread rajan
Yes. I agree that the superuser cannot be restricted with any access. But my scenarios is, I am executing a function(VOLATILE SECURITY DEFINER) using the superuser and it function fails with unable to select a particular table. At the same time, I am able to select the table as a superuser, by ex

Re: [GENERAL] Unable to select a table as postgres user

2015-10-29 Thread Pavel Stehule
2015-10-30 6:56 GMT+01:00 rajan : > I have a database in which tables are created for each user when they > create > an account. These auto generated tables are used for generating analytics > using a Function. This function is defined as a SECURITY DEFINER. So that > any user who tries to execute

Re: [GENERAL] Unable to select a table as postgres user

2015-10-29 Thread John R Pierce
On 10/29/2015 10:56 PM, rajan wrote: I have a database in which tables are created for each user when they create an account. These auto generated tables are used for generating analytics using a Function. This function is defined as a SECURITY DEFINER. So that any user who tries to execute this