Hi all,

On Tue, 2010-11-30 at 12:05 -0800, Josh Berkus wrote:
> Can you explain, for our benefit, the use case for this?  Specifically,
> what can be done with synonyms which can't be done with search_path and
> VIEWs?

I had a few cases where synonyms for user/data base names would have
helped me slightly (not something I couldn't work around).

The actual use case was when I wanted to change the name of a data base
and user names (just a configuration coherency thing) - using a synonym
I could have done it without downtime by creating the synonym first,
then reconfiguring each application machine individually (they are
redundant, and can be restarted transparently). Without the synonyms, I
had to wait for the next full downtime (which we do quite rarely) and
reconfigure the DB and all application boxes at the same time.

Ideally the user/DB name synonym would be like a hard link, equivalent
in all respects to the original name, so that you can delete the
original name and the synonym continues to work.

Likely the pg_hba.conf would need to still distinguish between the
DB/user names and their synonyms - not sure if that could be useful or
would be a PITA.

Of course this has nothing to do with the table synonyms - there I
didn't have yet any reason I would use one...

Cheers,
Csaba.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to