Re: Rectifying wrong Date outputs
От | Tom Lane |
---|---|
Тема | Re: Rectifying wrong Date outputs |
Дата | |
Msg-id | 20815.1300717130@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Rectifying wrong Date outputs (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Rectifying wrong Date outputs
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > On Mon, Mar 21, 2011 at 9:57 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> What I was thinking was that YYYY would take either 2 or 4 digits. >> Whatever you do here, the year will have to be delimited by a non-digit >> for such cases to be parseable. > I was assuming a slightly more general variant of that - namely, Y, > YY, or YYY would all accept that many digits, or more; and the result > of Y with 2, 3, or 4 digits would be the same as if YY, YYY, or YYYY, > respectively, had been used. As far as I can see, that would completely destroy the use-case of trying to parse a string where there's not non-digit delimiters and so you have to take exactly the specified number of digits, not more. Why not head in the other direction of allowing fewer digits than suggested by the format, instead of more? regards, tom lane
В списке pgsql-hackers по дате отправления: