Re: Strange interaction of union and expressions

From: Kevin Murphy <murphy2(at)speakeasy(dot)net>
To: Aaron Bingham <bingham(at)cenix-bioscience(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Gregory Gimenez <gimenez(at)cenix-bioscience(dot)com>
Subject: Re: Strange interaction of union and expressions
Date: 2005-04-20 19:24:04
Message-ID: ed92fde15115719583b3538e42aad0b3@speakeasy.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 what you asked.

You mean:

select '"' || foo || '"' from (select foo from a union select foo from
b) as subq;

Right?

-Kevin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aaron Bingham 2005-04-20 19:37:20 Re: Strange interaction of union and expressions
Previous Message A. Cropi 2005-04-20 18:27:13 electronic-izing unicode texts