Re: CREATE SYNONYM ...

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, Hans-J?rgen Sch?nig <postgres(at)cybertec(dot)at>, Michael Glaesemann <grzm(at)myrealbox(dot)com>, pgsql-patches(at)postgresql(dot)org, eg(at)cybertec(dot)at
Subject: Re: CREATE SYNONYM ...
Date: 2006-03-08 08:02:02
Message-ID: 1141804922.20504.28.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Markus Schaber 2006-03-08 12:07:27 Re: [SQL] Interval subtracting
Previous Message Stephan Szabo 2006-03-08 07:44:05 Re: CREATE SYNONYM ...