Re: Interval constant syntax, was Re: Interval & check clause
В списке pgsql-general по дате отправления:
| От | Bruno Wolff III |
|---|---|
| Тема | Re: Interval constant syntax, was Re: Interval & check clause |
| Дата | |
| Msg-id | 20040330052236.GA14444@wolff.to обсуждение исходный текст |
| Ответ на | Re: Interval constant syntax, was Re: Interval & check clause ("Karl O. Pinc" <kop@meme.com>) |
| Ответы |
Re: Interval constant syntax, was Re: Interval & check clause
|
| Список | pgsql-general |
On Mon, Mar 29, 2004 at 15:28:59 -0600,
"Karl O. Pinc" <kop@meme.com> wrote:
>
> And this was my scratch psql test:
>
> => select CAST('1/1/2004' AS date) - '3 years';
> ERROR: Bad date external representation '3 years'
>
> I am using 7.3 so maybe this has been fixed. Or it's just the
> operator, some require casts and some don't and you just have to find
> out the hard way. :(
This is different in that you are using - instead of >= . Date - Date
will get picked because that is the only - operator with a left operand
of type date. You are trying to use timestamp - interval (with date
getting promoted to timestamp).
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера