From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alexey Klyukin <alexk(at)commandprompt(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Another proposal for table synonyms |
Date: | 2010-11-30 16:28:52 |
Message-ID: | 27415.1291134532@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alexey Klyukin <alexk(at)commandprompt(dot)com> writes:
> To support addition of new database objects types that can be referenced by
> synonyms a new system catalog, pg_synonym, is to be added, with an oid to
> support comments on synonym, and the following schema:
This is not going to work, at least not without making every type of
lookup consult pg_synonym too, which I think can be considered DOA
because of its performance impact on people who aren't even using the
feature. It's also quite unclear how you prevent duplicate names
if the synonyms are in their own catalog. (And no, the part of your
proposal that says you're not preventing that isn't acceptable from
a usability standpoint.)
You could reasonably support synonyms for tables/views by storing them
in pg_class with a new relkind. This doesn't cover synonyms for other
object types, but since the total world demand for such a feature is
approximately zero, that's not really a problem.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-11-30 16:30:53 | Re: crash-safe visibility map, take three |
Previous Message | Heikki Linnakangas | 2010-11-30 16:27:30 | Re: crash-safe visibility map, take three |