Skip site navigation (1) Skip section navigation (2)

Re: Patch for SQL-Standard Interval output anddecouplingDateStyle from IntervalStyle

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Ron Mayer" <rm_pg(at)cheapcomplexdevices(dot)com>,"Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Patch for SQL-Standard Interval output anddecouplingDateStyle from IntervalStyle
Date: 2008-11-04 15:57:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
>>> Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> wrote: 
> It seems to me that the last remaining place where we input
> a SQL-2008 standard literal and do something different from
> what the standard suggests is with the string:
>    '-1 2:03:04'
> The standard seems to say that the "-" affects both the
> days and hour/min/sec part;
> while PostgreSQL historically,
> and the patch as I first submitted it only apply the negative
> sign to the days part.
> IMHO when the IntervalStyle GUC is set to "sql_standard",
> it'd be better if the parsing of this literal matched the
> standard.  We already have the precedent where DateStyle
> is used to interpret otherwise ambiguous output.
> If the IntervalStyle is set to anything other than sql_standard
> we'll keep parsing them the old way; so I think backwards
> compatibility issues would be minimized.   And those
> using the sql_standard mode are likely to be standards
> fanatics anyway, and would probably appreciate following the
> standard rather than the backward compatible mode.
>    Thoughts?
I think it would be good to be able to configure PostgreSQL such that
it didn't take standards-compliant literals and silently treat them in
a non-standard way.  What you propose here seems sane to me, but if
someone objects, it would be good for some other value or other GUC to
provide compliant behavior.

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-11-04 16:00:09
Subject: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Previous:From: Heikki LinnakangasDate: 2008-11-04 15:55:04
Subject: Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group