Re: insert throw error when year field len > 4 for timestamptz datatype - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: insert throw error when year field len > 4 for timestamptz datatype
Date
Msg-id 20131001235218.GE13385@momjian.us
Whole thread Raw
In response to Re: insert throw error when year field len > 4 for timestamptz datatype  (Haribabu kommi <haribabu.kommi@huawei.com>)
Responses Re: insert throw error when year field len > 4 for timestamptz datatype  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Sep 27, 2013 at 10:42:17AM +0000, Haribabu kommi wrote:
> If the changes are very high to deal all scenarios,
>
> I feel it is better do it only in scenarios where the use cases needs it, until
> it is not confusing users.
>
> The rest can be documented.
>
> Any other opinions/suggestions welcome.

I have reviewed this patch and it is good.  The problem is guessing if a
number with 5+ digits is YMD, HMS, or a year.  I have created a modified
patch, attached, assumes a 5-digit number is a year, because YMD and HMS
require at least six digits, and used your date/time test to control the
other cases.  I also added a few more regression tests.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Attachment

pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: No Index-Only Scan on Partial Index
Next
From: Peter Geoghegan
Date:
Subject: Re: pg_stat_statements: calls under-estimation propagation