Re: plpgsql & date-time functions

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: plpgsql & date-time functions
Дата
Msg-id 20050313183247.J69508@megazone.bigpanda.com
обсуждение исходный текст
Ответ на plpgsql & date-time functions  ("Fatih Cerit" <fatih@intersan.com.tr>)
Список pgsql-sql
On Tue, 8 Mar 2005, Fatih Cerit wrote:

> I have a function and I want to update a table's two rows but having problem
> with plpgsql & date-time functions. First field of the table must be now()
> this is ok.. but the second field must be now() + '60 days' if the query
> like this : SELECT INTO to_day now() + interval '60 days' ; it works but if
> I use variable instead of  '60 days' it doesn't work. And I must use
> variable....

If you want a variable number of days, something likenow() + variable * interval '1 day'
will probably work.



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

Предыдущее
От: Matteo Beccati
Дата:
Сообщение: Re: [ADMIN] Postgres schema comparison.
Следующее
От: "Sean Davis"
Дата:
Сообщение: Re: Newbie wonder...