Re: INTERVAL data type and libpq - what format?

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: INTERVAL data type and libpq - what format?
Date: 2009-05-20 09:41:10
Message-ID: 4A13D036.9070406@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Sam Mason wrote:
> You get an error because " 123 11" isn't a valid literal of an
> (undecorated) INTERVAL type.

Hmm..... should it be?
Skimming the spec makes me think it might be a valid day-time interval.

Quoting the spec:
<unquoted interval string> ::=
[ <sign> ] { <year-month literal> | <day-time literal> }
...
<day-time literal> ::=
<day-time interval>
| <time interval>
<day-time interval> ::=
<days value> [ <space> <hours value> [ <colon> <minutes value>
[ <colon> <seconds value> ] ] ]

I can send a patch if this interpretation is right...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-05-20 09:41:49 Re: Can I pause the pg_dump or pg_restore
Previous Message Thomas Kellerer 2009-05-20 09:36:43 Re: [Windows] Feedback on PG?

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Keller 2009-05-20 10:34:00 Re: Proposal: functions get_text() or get_url()
Previous Message Heikki Linnakangas 2009-05-20 08:48:34 Re: Compiler warning