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 | 15385.1111618983@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #1517: SQL interval syntax is accepted by the parser, (Roy Badami <roy@gnomon.org.uk>) |
Ответы |
Re: BUG #1517: SQL interval syntax is accepted by the parser,
|
Список | pgsql-bugs |
Roy Badami <roy@gnomon.org.uk> writes: > Roy> The 'constraint' (interval type descriptor or whatever it's > Roy> really called) is mandatory in standard SQL, True. (<interval qualifier> is what SQL99 calls it.) > I have no objection to allowing things like > '1 hour 10 minutes' DAY TO SECOND > but I'm just wondering whether the hybrid syntax is an unnecessary > complication. In the context of interval literals it's probably unnecessary, but that's not the only thing to worry about. In particular we have to consider the behavior of the input and output routines for cases like COPY. I think it would be really bad to reject '1 hour 10 minutes' as data input into an interval field just because it has an ISO qualifier. Also, I would personally prefer to see the output from an interval field remain in the Postgres format, precisely because the ISO format is ambiguous without knowledge of the qualifier. (Possibly we should create a DateStyle-like GUC to determine that, but so far no one's requested one.) regards, tom lane
В списке pgsql-bugs по дате отправления: