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

Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Date: 2008-11-04 16:00:09
Message-ID: 19477.1225814409@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
> Ah.  And one final question regarding functionality.
> 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.

Then how would you input a value that had different signs for the
day and the h/m/s?  I don't think "you can't" is an acceptable
answer there, because it would mean that interval_out has to fail
on such values when IntervalStyle is "sql_standard".  Which is
very clearly not gonna do.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2008-11-04 16:01:07
Subject: Re: [WIP] In-place upgrade
Previous:From: Kevin GrittnerDate: 2008-11-04 15:57:40
Subject: Re: Patch for SQL-Standard Interval output anddecouplingDateStyle from IntervalStyle

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