Re: Strange interaction of union and expressions

From: Aaron Bingham <bingham(at)cenix-bioscience(dot)com>
To: Kevin Murphy <murphy2(at)speakeasy(dot)net>
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:37:20
Message-ID: l84qe1jl3j.fsf@lynx.cenix-bioscience.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Murphy <murphy2(at)speakeasy(dot)net> 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 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?

Ah, I get it now. Thanks!

--
--------------------------------------------------------------------
Aaron Bingham
Software Engineer
Cenix BioScience GmbH
--------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2005-04-20 19:52:46 Re: I'm OWNER of the db but I get `permission denied` when
Previous Message Kevin Murphy 2005-04-20 19:24:04 Re: Strange interaction of union and expressions