From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Edwin UY <edwin(dot)uy(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Foreign tables - oracle_fdw |
Date: | 2024-05-06 07:11:10 |
Message-ID: | d32da6678e4092bcaec0fb77031a1f2d9224a2d4.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Sun, 2024-05-05 at 19:29 +1200, Edwin UY wrote:
> > The foreign table needs to be created only once, but you must give all users privileges
> > to access the schema (USAGE) and the foreign table (SELECT, ...).
>
> The examples that I followed does not have the instruction how to do the grant
> to the foreign table created
See the GRANT statement:
https://www.postgresql.org/docs/current/sql-grant.html
> As user1, I did grant all on [foreign_table] to [schema1_owner], then I login
> as [schema1_owner] and tried doing select * from the [foreign_table] or
> select * from [user1].[foreign_table] and it gives
> ERROR: relation "[foreign_table]" does not exist.
> I am pretty sure I get something wrong :-)
If it is not on your "search_path", use schema_name.table_name to reference
the (foreign) table.
>
> so far no luck with my Google searches.
> I've been searching for hours now and still doing so, just had a wee hours break :-)
It is all in the PostgreSQL documentation.
>
> I can't login as PUBLIC on Aurora-PostgresSQL or on PostgreSQL itself, can I?
That is nologin role and no real role at all.
It is a way to say "everybody".
I recommend that you spend a few hours with the PostgreSQL documentation,
reading up on schemas (https://www.postgresql.org/docs/current/ddl-schemas.html)
privileges (https://www.postgresql.org/docs/current/ddl-priv.html) and
roles (https://www.postgresql.org/docs/current/user-manag.html)
Perhaps then it will start making more sense.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar | 2024-05-06 12:24:27 | Re: Health check report |
Previous Message | Kashif Zeeshan | 2024-05-06 07:05:33 | Re: Health check report |