Re: BUG #1517: SQL interval syntax is accepted by the parser,
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #1517: SQL interval syntax is accepted by the parser, |
| Дата | |
| Msg-id | 15836.1111621794@sss.pgh.pa.us обсуждение |
| Ответ на | Re: BUG #1517: SQL interval syntax is accepted by the parser, (Roy Badami <roy@gnomon.org.uk>) |
| Список | pgsql-bugs |
Roy Badami <roy@gnomon.org.uk> writes:
> That convinces me that you have to figure out what to do with
> CAST ('1 year 1 month' AS INTERVAL MONTH)
> It _still_ doesn't completely convince me that you need to (or even
> want to) support hybrid interval syntax.
> Though given you have to support both pg and ISO syntax in the cast, I
> guess it becomes more consistent (and less implementation work) to
> support both in the literal, too...
Right. It's the same underlying routines; it would actually be pretty
hard to make the above cast behave differently from input into a column
of INTERVAL MONTH type, or from the interval-literal case. In all these
cases we are taking a string and cramming it into the input conversion
function for the INTERVAL datatype. The conversion function has access
to the typmod (ie the encoded <interval qualifier>) but it doesn't know
much more about the context than that.
regards, tom lane
В списке pgsql-bugs по дате отправления: