Re: CREATE SYNONYM ... - Mailing list pgsql-patches

From Stephen Frost
Subject Re: CREATE SYNONYM ...
Date
Msg-id 20060308131644.GE4474@ns.snowman.net
Whole thread Raw
In response to Re: CREATE SYNONYM ...  (Neil Conway <neilc@samurai.com>)
Responses Re: CREATE SYNONYM ...  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
* Neil Conway (neilc@samurai.com) wrote:
> BTW, AFAICS synonyms for tables and views can be approximated by views:
> you pay a small runtime hit to expand the view definition, but that's
> fairly cheap for a simple view. Synonyms for functions can be
> approximated by shell functions defined in SQL -- those can even be
> inlined, reducing the amount of overhead. It's not as easy to define
> synonyms for sequences, but that is hardly justification for the
> feature.

If all you were doing with the view was reading from it then sure...
Creating the rules for all the views you want to make them updatable
wouldn't be fun.  That's actually the one thing I like about synonyms
over create view a as select * from b.a;

We've got a number of synonyms in our Oracle databases (no
cross-database ones or anything like that...) and I'd like to get rid of
them but the folks using them aren't too keen on that for various
reasons...  It'd be nice to be able to support them in Postgres without
having to go through alot of work.  Tom's suggestion for just an
additional catalog entry for them would be exactly what I'd need and
seems pretty straight-forward and simple to me.

Just my 2c.

    Thanks,

        Stephen

Attachment

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: CREATE SYNONYM ...
Next
From: "Jonah H. Harris"
Date:
Subject: Re: CREATE SYNONYM ...