column aliases? - Mailing list pgsql-general

From Gauthier, Dave
Subject column aliases?
Date
Msg-id 482E80323A35A54498B8B70FF2B8798004220EE7B4@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: column aliases?
List pgsql-general

Hi:

 

Does PG support the notion of a colum alias?  I’m not talking about “select foo as fii....”, I’m thinking more along the lines of supporting 2 different names for the same column.   For example, a tablle has a column named “social_security_number”.  Queries may ask for this column as defined (“social_security_number”) but some may ask for is using “ssn”. 

 

Is there a way to assign 2 different names for the same column to support a situation like above?

 

I was thinking that a view might do this, but is not a direct table query.  It’s also not editable.

 

Thanks for any help !!!

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Cache lookup error
Next
From: Vick Khera
Date:
Subject: Re: PGconn gets frozen ocassionally after select() timeout