Unable to select a table as postgres user - Mailing list pgsql-general

From rajan
Subject Unable to select a table as postgres user
Date
Msg-id 1446184592428-5872036.post@n5.nabble.com
Whole thread Raw
Responses Re: Unable to select a table as postgres user
Re: Unable to select a table as postgres user
List pgsql-general
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 function will be doing so as a Super
user.

But it is not working as expected. For Example, When execute the functions
as User1, I get an error that the User1 is unable to select the table. When
I execute the functions as postgres user, I still get the same error!!!

Was able to execute the function only after GRANT SELECT on that table.

My question is,
When I execute the function as a Superuser, How come I get an error on
Unable to select the table?



--
View this message in context: http://postgresql.nabble.com/Unable-to-select-a-table-as-postgres-user-tp5872036.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BDR: name conflict when joining a rebuilt node
Next
From: John R Pierce
Date:
Subject: Re: Unable to select a table as postgres user