| От | Stephan Szabo |
|---|---|
| Тема | Re: Suggestion for Date/Time Functions Section |
| Дата | |
| Msg-id | 20050819224233.C81094@megazone.bigpanda.com обсуждение исходный текст |
| Ответ на | Suggestion for Date/Time Functions Section (CSN <cool_screen_name90001@yahoo.com>) |
| Список | pgsql-general |
On Fri, 19 Aug 2005, CSN wrote: > Hi, > > I suggestion for the date/time functions in the docs: > http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html > > I was trying to figure out how to do: > update table set next=now() + interval 'table.period > seconds'; > > I tried subqueries, the concat operator, and anything > else I could think of until I rediscovered the page on > the various ways to cast. Perhaps mix up the examples > in the docs so other ways to do date arithmetic (and > that allow expressions, fields, etc.) are obvious: > > date '2001-09-28' + cast((7+7)||' seconds' as > interval); I'd suggest something like date '2001-09-28' + (7+7) * interval '1 second'; instead of using text concatenation.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера