Re: simulate union in subselect - Mailing list pgsql-sql

From Tom Lane
Subject Re: simulate union in subselect
Date
Msg-id 16267.988298227@sss.pgh.pa.us
Whole thread Raw
In response to simulate union in subselect  ("Wei Weng" <wweng@kencast.com>)
Responses Generate GUID in postgresql  (Wei Weng <wweng@kencast.com>)
List pgsql-sql
"Wei Weng" <wweng@kencast.com> writes:
> I know this is not do-able, but is there any way to simulate the
> following in Postgresql 7.1?

> select id from
> (select id, recv_date as date from table1 
> union
> select id, send_date as date from table2) AS subtable
> order by date;

What gives you the idea that this doesn't work?
        regards, tom lane


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: simulate union in subselect
Next
From: "Kenn Thompson"
Date:
Subject: Re: realising a counter in an pgpsql-trigger