Is it possible to have multiple names for a column?

From: felix(at)crowfix(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Is it possible to have multiple names for a column?
Date: 2006-09-14 19:18:05
Message-ID: 20060914191805.GA10037@crowfix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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;

I am pretty certain no such SQL command exists. But is it possible to
do something sneaky to the internal tables so that two names point to
the same columnand everything just works? Everything meaning updates,
inserts, etc, not further ALTER TABLE and so on.

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / felix(at)crowfix(dot)com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-09-14 19:29:46 Re: Is it possible to have multiple names for a column?
Previous Message Stephen Frost 2006-09-14 19:05:40 Re: PostgreSQL slammed by PHP creator