Re: Do we want SYNONYMS? - Mailing list pgsql-general

From Tom Lane
Subject Re: Do we want SYNONYMS?
Date
Msg-id 2039.1291669272@sss.pgh.pa.us
Whole thread Raw
In response to Re: Do we want SYNONYMS?  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
"Joshua D. Drake" <jd@commandprompt.com> writes:
> On Mon, 2010-12-06 at 15:27 -0500, Tom Lane wrote:
>> "Joshua D. Drake" <jd@commandprompt.com> writes:
> On Mon, 2010-12-06 at 13:57 -0600, Andy Colson wrote:
>>>> I dont understand the need for it.  Dont view's do the exact same thing
>>>> (plus even more)?  What does a synonym offer that a view does not?

>>> SYNONYMS work for things that aren't a table.

>> The idea of synonyms for non-table things was pretty much rejected
>> already on the -hackers thread.

> Well I was referring to basically anything that is stored in pg_class
> (not operators or functions).

Well, that would more or less boil down to "you can use synonyms for
sequences" (there not being much else in pg_class that users have need
to refer to).  Plus "you can use synonyms for updates not just reading",
which views don't support without writing tedious and fragile rules.
Of course we might fix the latter problem someday, but progress in that
direction seems to be slow.

So I don't say that pg_class-only synonyms would be useless.  But let's
be sure people understand what they would do or not do before soliciting
opinions on how useful they are.

            regards, tom lane

pgsql-general by date:

Previous
From: David Kerr
Date:
Subject: Re: Problems Authenticating against OpenLDAP
Next
From: Tom Lane
Date:
Subject: Re: Do we want SYNONYMS?