From: Bruce Momjian <maillist@candle.pha.pa.us>
To: dimitri@France.Sun.COM
Cc: walt@stimpy.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] returning the current date in a SQL query
Date: Wed, 12 Aug 1998 15:42:16 -0400 (EDT)
Message-ID: <199808121943.PAA15897@candle.pha.pa.us> (raw)
In-Reply-To: <9808122134240I.00535@dimitri>
> I think you have to play with UNION:
>
> select ... , project_date from tblprojects where title not in ( '[unknown]',
> 'pending' )
> UNION ALL
> select ... , 'now'::datetime from tblprojects where title = '[unknown]'
> UNION ALL
> select ... , 'now'::datetime from tblprojects where title = 'pending';
>
> It'll be more elegant if you create a VIEW with this query, but
> for the moment UNION is not available in VIEWs...
>
> Hope it helps...
> (dim)
yes, that is on the TODO list.
Not sure it will be in 6.4. Depend on the rewrite system cleanups.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: maillist@candle.pha.pa.us, dimitri@France.Sun.COM, walt@stimpy.com
Subject: Re: [SQL] returning the current date in a SQL query
In-Reply-To: <199808121943.PAA15897@candle.pha.pa.us>
References: <9808122134240I.00535@dimitri> <199808121943.PAA15897@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox