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

From: Bernhard Weisshuhn <bkw(at)weisshuhn(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Is it possible to have multiple names for a column?
Date: 2006-09-14 20:42:52
Message-ID: 20060914204251.GA12470@weisshuhn.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 14, 2006 at 12:18:05PM -0700, felix(at)crowfix(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon_Kelly 2006-09-14 21:03:44 Re: PostgreSQL slammed by PHP creator
Previous Message Poul Møller Hansen 2006-09-14 20:40:01 Sun Java Studio Creator and PostgreSQL