From: | "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> |
---|---|
To: | Dmitriy Igrishin <dmitigr(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Do we want SYNONYMS? |
Date: | 2010-12-06 21:49:02 |
Message-ID: | 482E80323A35A54498B8B70FF2B87980047DD9FF64@azsmsx504.amr.corp.intel.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Not multiple databases, multiple sites looking at the same DB, each using a somewhat different naming system. And then apps/scripts from one site (using that venacular) are shared with others at other sites (using a different venacular). So even within a site you have multiple ways of querying the table.
Views don't seem like a good option because you'd have to know ahead of time what view to use. Also, for one table there may be many different columns that have multiple names. So you'd need one view per name combo.
Instead, something like...
create table foo (last_name:lastname:surname text, first_name:firstname text, date_of_birth:dob:year_born int);
... would be real sweet !
Yes, it can be (and is being) done externally with wrappers. If a user wants to query the DB directly, they have to know the names that were chosen/used when the table was defined.
From: Dmitriy Igrishin [mailto:dmitigr(at)gmail(dot)com]
Sent: Monday, December 06, 2010 4:26 PM
To: Gauthier, Dave
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Do we want SYNONYMS?
2010/12/7 Dmitriy Igrishin <dmitigr(at)gmail(dot)com<mailto:dmitigr(at)gmail(dot)com>>
2010/12/7 Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com<mailto:dave(dot)gauthier(at)intel(dot)com>>
I think aliasing non-table/view was mixed by Tom, but just as FYI, aliasing column names would be very helpful in my apps. Aliasing "last_name", "lastname", "surname" together in a people table for example. We have many design sites that have identical data concepts but with different names for the same thing. It would be nice to just equate these names in the DB instead of in perl wrappers around sql calls.
Interesting, how will you maintain synonyms in a many databases ?
IMO it is more simple to make abstraction level at the application side
in one place rather than create synonyms in different databases.
And if you just standardize the naming in a different databases why
not use views ?
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org<mailto:pgsql-general-owner(at)postgresql(dot)org> [mailto:pgsql-general-owner(at)postgresql(dot)org<mailto:pgsql-general-owner(at)postgresql(dot)org>] On Behalf Of Andy Colson
Sent: Monday, December 06, 2010 2:57 PM
To: jd(at)commandprompt(dot)com<mailto:jd(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org<mailto:pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Do we want SYNONYMS?
On 12/6/2010 1:31 PM, Joshua D. Drake wrote:
> Hey -general,
>
> Command Prompt is currently considering writing a patch to provide
> synonyms to PostgreSQL. Is this something the community is interested
> in? Do we have use cases for it? MSSQL, DB2 and Oracle support them.
>
> Reference thread:
>
> http://archives.postgresql.org/pgsql-hackers/2010-11/msg02043.php
>
> Joshua D. Drake
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?
And perusing the thread, I see it might cause all name and operator
lookups to be slower? (I didnt read all of it though)
I'm gonna have to go: -1
-Andy
--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org<mailto:pgsql-general(at)postgresql(dot)org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org<mailto:pgsql-general(at)postgresql(dot)org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
// Dmitriy.
--
// Dmitriy.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael C Rosenstein | 2010-12-06 22:12:05 | Re: Do we want SYNONYMS? |
Previous Message | Andy Colson | 2010-12-06 21:43:29 | Re: Do we want SYNONYMS? |