Re: [GENERAL] to_timestamp() and quartersf
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Brendan Jurd <direvus@gmail.com>, Scott Bailey <artacus@comcast.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-03-03T22:30:01Z
Lists: pgsql-hackers, pgsql-general
Attachments
- /rtmp/diff (text/x-diff) patch
Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> writes: > > Here is an updated patch that honors 'Q' only if the month has not been > > previously supplied: > > That's just weird. It's not even self-consistent much less > unsurprising --- having the behavior be dependent on field order is > really horrid. > > I think what people would actually want for this type of situation is > a way to specify "there is an integer here but I want to ignore it". > Q as it's presently constituted accomplishes that, though it is not > documented as doing so. Brendan's comment about quoted text is > interesting, but it doesn't really solve the problem because of the > possibility of the integer field being variable width. I have updated the comments that "Q" is ignored by to_date and to_timestamp, and added a C comment. I also documented the double-quote input-skip behavior of to_timestamp, to_number, and to_date. Applied patch attached. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do