Re: Unexpected parse behaviour for date to timestamp
От | Jean-Christian Imbeault |
---|---|
Тема | Re: Unexpected parse behaviour for date to timestamp |
Дата | |
Msg-id | 3E6972A8.9040600@mega-bucks.co.jp обсуждение исходный текст |
Ответ на | Re: Unexpected parse behaviour for date to timestamp (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
Ответы |
Re: Unexpected parse behaviour for date to timestamp
|
Список | pgsql-general |
Tom Lane wrote: > > Yeah. And IMHO this should be rejected entirely; there is no "date <= int4" > operator. If you dig into it you find that the parser is actually > interpreting the query as WHERE submit::text <= '1991'::text. > Apparently "text <= text" is the closest match it can find. > > This is just another example of why allowing implicit coercions from > everything to text is a Bad Idea ... I agree. Of course my syntax was wrong and I should have spotted the error right away, but I agree that the parser should have thrown an error. Could this be put on the the to-do list? As an aside, and for my own edificaton, what is the "correct" was to pass a date in as an SQL argument? Using '2003-01-01' works but it seems the parser is actually viewing this as text and not a date? Is this the way it should be? Jc
В списке pgsql-general по дате отправления: