Date variables in psql

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема Date variables in psql
Дата
Msg-id 20041007130940.F64746@zoraida.natserv.net
обсуждение исходный текст
Ответы Re: Date variables in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Trying the following simple sql file:
\set proc_date 6/30/2004
\echo Date is :proc_date
select * from feeds where date = :proc_date limit 20;

If I start psql with the "-a" option I see the output:
\set proc_date 6/30/2004
\echo Date is :proc_date
Date is 6/30/2004
select * from feeds where date = :proc_date limit 20;

and get no records
If I type the exact same query manually it workds
select * from feeds where date = '6/30/2004' limit 20;

Any ideas of the variable may not be recognized on the select statement?

В списке pgsql-general по дате отправления:

Предыдущее
От: Vic Cekvenich
Дата:
Сообщение: pre-sroted table (w/ index)
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: pre-sroted table (w/ index)