From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Matthew Seaborn *EXTERN*" <Matthew(dot)Seaborn(at)performgroup(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Search Path vs Synonyms |
Date: | 2009-07-24 06:22:29 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C203937E5F@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Matthew Seaborn wrote:
> Given the situation where a user connecting to the database
> needs access to two separate schemas: the primary schema
> which contains the data they will be updating and a second
> schema which contains read-only reference data, used by many
> users, that will be using in joins on queries.
>
> I don't want to have to use fully qualified names (I am
> migrating code from Oracle which uses synonyms), so what is
> the best way (in both performance and reliability) to refer
> to the tables; Search Path or Synonyms?
There are no synonyms in PostgreSQL: synonyms are Oracle's way
of search_path (though more selective).
You excluded the best solution, namely to qualify the objects.
If your user should be able to access *all* tables in both
schemas unqualified and there are no name collisions between
objects in the schemas, I would recommend search_path.
Otherwise, use views.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Seaborn | 2009-07-24 07:38:23 | Re: Search Path vs Synonyms |
Previous Message | martin | 2009-07-24 04:42:44 | Converting SQL to pg |