Re: Can column name aliases be supported?

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Can column name aliases be supported?
Дата
Msg-id CAPTjJmqr9fuUFZfKaixOL62pS50bZr560kC8qy+NkiDXVjQ1dw@mail.gmail.com
обсуждение исходный текст
Ответ на Can column name aliases be supported?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы Re: Can column name aliases be supported?
Список pgsql-general
On Thu, Aug 23, 2012 at 8:19 AM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> I have a table with a column called "last_name".  I have one customer who
> likes to articulate queries and updates for this using column name
> "last_name" (no problem there) but another who likes to call it "lname" and
> yet another who likes to call it "surname".    So 3 different names for the
> same physical column in the table.

Here's an out-of-the-box suggestion.

Drop the column altogether and have a single column "name". Trying to
divide names up never works properly. Does "surname" mean family name?
Not all cultures put the family name last. Is "last_name" simply the
part of the name after the last space?

Save yourself a whole lot of trouble and just store names in single
fields. And you dodge the field naming issue at the same time!

ChrisA


В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Travers
Дата:
Сообщение: Some thoughts on table inheritance (which is uniquely awesome on PostgreSQL)
Следующее
От: Mike Christensen
Дата:
Сообщение: Re: What text format is this and can I import it into Postgres?