23, 2012 1:23 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Can column name aliases be supported?
On Thu, Aug 23, 2012 at 2:19 PM, Craig Ringer ring...@ringerc.id.au wrote:
On 08/23/2012 11:56 AM, Chris Angelico wrote:
Here's an out-of-the-box suggestion.
Drop the column
: Thursday, August 23, 2012 9:52 AM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Can column name aliases be supported?
On 08/23/2012 09:32 PM, Gauthier, Dave wrote:
The view approach for queries is workable, at least for queries. Thanks for
the input
On 08/23/2012 09:32 PM, Gauthier, Dave wrote:
The view approach for queries is workable, at least for queries. Thanks for
the input on that and the idea to replicate the various aliases in the view!
The key issue with all your approaches is whether the client can ever
`UPDATE` the view. If
On 08/23/2012 10:19 PM, Gauthier, Dave wrote:
Updateable views. This is great. I didn't know about these. Absolutely
delicious !
I found a great example here...
http://vibhorkumar.wordpress.com/2011/10/28/instead-of-trigger/
The problem of user updating 1 alias remains, but I have no
Here's the problem
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
On 08/22/12 15:19, Gauthier, Dave wrote:
I know a view can be used to alias one of them.
It can alias all of them:
create view xyz as
select *, last_name as lname, last_name as surname
from mytable;
(not the nicest version but functional)
HTH.
Bosco.
--
Sent via pgsql-general
On 08/22/2012 04:19 PM, Gauthier, Dave wrote:
Here's the problem
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
Ooops! Hit send too fast...
On 08/22/12 15:34, Bosco Rama wrote:
On 08/22/12 15:19, Gauthier, Dave wrote:
I know a view can be used to alias one of them.
It can alias all of them:
create view xyz as
select *, last_name as lname, last_name as surname
from mytable;
(not the
On 08/23/2012 06:41 AM, Bosco Rama wrote:
Ooops! Hit send too fast...
On 08/22/12 15:34, Bosco Rama wrote:
On 08/22/12 15:19, Gauthier, Dave wrote:
I know a view can be used to alias one of them.
It can alias all of them:
create view xyz as
select *, last_name as lname, last_name as
On Thu, Aug 23, 2012 at 8:19 AM, Gauthier, Dave dave.gauth...@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
On 08/23/2012 11:56 AM, Chris Angelico wrote:
On Thu, Aug 23, 2012 at 8:19 AM, Gauthier, Dave dave.gauth...@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)
On Thu, Aug 23, 2012 at 2:19 PM, Craig Ringer ring...@ringerc.id.au wrote:
On 08/23/2012 11:56 AM, Chris Angelico wrote:
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
12 matches
Mail list logo