casting... adding integer to timestamp

Поиск
Список
Период
Сортировка
От Mark Gibson
Тема casting... adding integer to timestamp
Дата
Msg-id 449E1DED.2000305@gibsonsoftware.com
обсуждение исходный текст
Ответы Re: casting... adding integer to timestamp  (Michael Glaesemann <grzm@seespotcode.net>)
Re: casting... adding integer to timestamp  (Frank Finner <postgresql@finner.de>)
Re: casting... adding integer to timestamp  (Alex Pavlovic <alex.pavlovic@taskforce-1.com>)
Список pgsql-general

If play_length is a timestamp, I can do this:

SELECT  play_length - INTERVAL '13 seconds' ...

But what if play_seconds is a column?

SELECT  play_length - INTERVAL 'play_seconds seconds' ...

This doesn't work.

ERROR:  invalid input syntax for type interval: "play_seconds seconds"

Can anyone help?

Thanks,
Mark

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

Предыдущее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: auto-vacuum & Negative "anl" Values
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: casting... adding integer to timestamp