Re: [GENERAL] Strange interaction of union and expressions

2005-04-20 Thread Kevin Murphy
On Apr 20, 2005, at 1:24 PM, Aaron Bingham wrote: create table a (foo varchar); insert into a (foo) values ('baz'); create table b (foo varchar); insert into b (foo) values ('woof'); select '"' || foo || '"' as foo from (select foo from a) as bar union select foo from b; No, it's doing

Re: [GENERAL] Strange interaction of union and expressions

2005-04-20 Thread Alvaro Herrera
On Wed, Apr 20, 2005 at 07:24:08PM +0200, Aaron Bingham wrote: Hi, > create table a (foo varchar); >x insert into a (foo) values ('baz'); > create table b (foo varchar); > insert into b (foo) values ('woof'); > select '"' || foo || '"' as foo > from (select foo from a) as bar > unio

Re: [GENERAL] Strange interaction of union and expressions

2005-04-20 Thread Oleg Bartunov
I see no problem. You get what you want. Correct query is: select '"' || foo || '"' as foo from (select foo from a union select foo from b ) as bar; Oleg On Wed, 20 Apr 2005, Aaron Bingham wrote: Hello all, We noticed some very odd behavior today with Postgres 7.4.5 Running the following SQL: c

Re: [GENERAL] Strange interaction of union and expressions

2005-04-20 Thread Aaron Bingham
Kevin Murphy <[EMAIL PROTECTED]> writes: > On Apr 20, 2005, at 1:24 PM, Aaron Bingham wrote: >> create table a (foo varchar); >> insert into a (foo) values ('baz'); >> create table b (foo varchar); >> insert into b (foo) values ('woof'); >> select '"' || foo || '"' as foo >> from (select foo f

[GENERAL] Strange interaction of union and expressions

2005-04-20 Thread Aaron Bingham
Hello all, We noticed some very odd behavior today with Postgres 7.4.5 Running the following SQL: create table a (foo varchar); insert into a (foo) values ('baz'); create table b (foo varchar); insert into b (foo) values ('woof'); select '"' || foo || '"' as foo from (select foo from a) as