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

From Neil Conway
Subject Re: CREATE SYNONYM ...
Date
Msg-id 1141804922.20504.28.camel@localhost.localdomain
Whole thread Raw
In response to Re: CREATE SYNONYM ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CREATE SYNONYM ...
Re: CREATE SYNONYM ...
List pgsql-patches
On Tue, 2006-03-07 at 17:14 -0500, Tom Lane wrote:
> (Actually, I don't think the case for table synonyms has been made
> adequately either; "Oracle has it" is *not* enough reason to take on
> another feature that we'll have to maintain forever, especially given
> that we're being told that one of the major use-cases for synonyms
> isn't going to be supported.

I'm inclined to agree. The points raised about the difficulties of
managing large numbers of schemas are legitimate, but I don't see that
synonyms are a very effective solution. If we're going to make it less
painful to work on applications with many tens of schemas, that's a
worthwhile project, but I think we should take a fresh look at the
problem rather than just blindly copying a construct from Oracle.

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.

-Neil



pgsql-patches by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: CREATE SYNONYM ...
Next
From: Stephen Frost
Date:
Subject: Re: CREATE SYNONYM ...