Re: Proposed patch: make SQL interval-literal syntax work per spec
От | Tom Lane |
---|---|
Тема | Re: Proposed patch: make SQL interval-literal syntax work per spec |
Дата | |
Msg-id | 16602.1221252002@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Proposed patch: make SQL interval-literal syntax work per spec (Ron Mayer <rm_pg@cheapcomplexdevices.com>) |
Ответы |
Re: Proposed patch: make SQL interval-literal syntax work
per spec
Re: Proposed patch: make SQL interval-literal syntax work per spec |
Список | pgsql-hackers |
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes: > Trying to do the SQL-standard output now, and have a question > of what to do in the SQL-standard mode when trying to output > an interval that as both a YEAR and a DAY component. > AFAICT the SQL standard doesn't let you have both, so the > "SQL-standard" output actually won't be. The reason it's not SQL-standard is the data value isn't. So not a problem. Someone conforming to the spec limits on what he puts in will see spec-compliant output. I think all you need is 'yyy-mm dd hh:mm:ss' where you omit yyy-mm if zeroes, omit dd if zero, omit hh:mm:ss if zeroes (but maybe only if dd is also 0? otherwise your output is just dd which is uncomfortably ambiguous). regards, tom lane
В списке pgsql-hackers по дате отправления: