Re: Unable to select a table as postgres user

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: rajan <vgmonnet(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unable to select a table as postgres user
Date: 2015-10-30 06:19:56
Message-ID: CAFj8pRCzk=NScgMMGN5=TWUV_ksvDKsEgQr3JhGPRQb_PGNbow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2015-10-30 6:56 GMT+01:00 rajan <vgmonnet(at)gmail(dot)com>:

> 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?
>

If you are superuser, then you can see all - there are no any limit. It is
impossible to do any limit of superuser in Postgres.

Regards

Pavel

>
>
>
> --
> 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.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rajan 2015-10-30 06:56:56 Re: Unable to select a table as postgres user
Previous Message John R Pierce 2015-10-30 06:15:38 Re: Unable to select a table as postgres user