Re: Examples of accessing postgresql with scripts?

Поиск
Список
Период
Сортировка
От hodges@xprt.net
Тема Re: Examples of accessing postgresql with scripts?
Дата
Msg-id 3ED88140.31328.AFC7AA@localhost
обсуждение исходный текст
Ответ на Re: Examples of accessing postgresql with scripts?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Duh.  Thanks
Tom

On 31 May 2003 at 13:10, Tom Lane wrote:

> hodges@xprt.net writes:
> > This works for me:
> > a=`eval date`  # now $a is current date/time
> > psql tom -c "SELECT * FROM firesides where date > '$a'"
>
> > Now how to set $a to 3 days in the future?
>
> I dunno how you would do that on the shell-script side, but it's easy to
> do the date arithmetic on the SQL side instead:
>
> psql tom -c "SELECT * FROM firesides where date > (current_date + 3)"
>
>             regards, tom lane
>



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Examples of accessing postgresql with scripts?
Следующее
От: Frank Bax
Дата:
Сообщение: Re: Examples of accessing postgresql with scripts?