Re: Is it possible to have multiple names for a column?

Поиск
Список
Период
Сортировка
От Bernhard Weisshuhn
Тема Re: Is it possible to have multiple names for a column?
Дата
Msg-id 20060914204251.GA12470@weisshuhn.de
обсуждение исходный текст
Ответ на Is it possible to have multiple names for a column?  (felix@crowfix.com)
Список pgsql-general
On Thu, Sep 14, 2006 at 12:18:05PM -0700, felix@crowfix.com wrote:

> We have a need to rename some columns, but since we can't update both
> the database and the programs instantly, we'd like to temporarily
> assign both names to the same column while the updates are in
> progress.  Something like this would be super nifty :-)
>
>     ALTER TABLE howdy_doody ADD NAME xyzzy TO COLUMN plugh;

If the clients only read the column, you could just add the new
column and create triggers that copy the value from the other column on
any modification.
Later you drop the old column and the triggers.

Maybe an approch based on rules might work? Dunno, haven't used them yet.

regards,
  bkw

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

Предыдущее
От: Poul Møller Hansen
Дата:
Сообщение: Sun Java Studio Creator and PostgreSQL
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: PostgreSQL slammed by PHP creator