Re: [SQL] returning the current date in a SQL query
От
Bruce Momjian
Тема
Re: [SQL] returning the current date in a SQL query
Дата
Msg-id
199808121943.PAA15897@candle.pha.pa.us
Ответ на
Список
Дерево обсуждения
returning the current date in a SQL query Walt Bigelow <walt@stimpy.com>
Re: [SQL] returning the current date in a SQL query Herouth Maoz <herouth@oumail.openu.ac.il>
> 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)
В списке pgsql-sql по дате отправления