Re: Do we want SYNONYMS?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jd(at)commandprompt(dot)com
Cc: Andy Colson <andy(at)squeakycode(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Do we want SYNONYMS?
Date: 2010-12-06 21:01:12
Message-ID: 2039.1291669272@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> On Mon, 2010-12-06 at 15:27 -0500, Tom Lane wrote:
>> "Joshua D. Drake" <jd(at)commandprompt(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message BRUSSER Michael 2010-12-06 21:04:44 Database encoding and locale
Previous Message David Kerr 2010-12-06 20:39:23 Re: Problems Authenticating against OpenLDAP