From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposed patch: make SQL interval-literal syntax work per spec |
Date: | 2008-09-12 00:42:13 |
Message-ID: | 48C9BAE5.3030106@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
>> '1Y1M'::interval ... minute ... month
> Hmmm. I would say that the problem with that is not that it's
> nonstandard but that it's ambiguous.
Ah yes.
> Our documentation...says..."or abbreviations".
>...What if we just tweak the code to
> reject ambiguous abbreviations?
Good idea. I'll try that.
> [ experiments a bit... ] Another interesting point is that "mo",
> which is a perfectly unique abbreviation, is rejected. Seems like
> the handling of abbreviations in this code could be improved.
It looks like rather than abbreviations being any shorter
form of a unit, it has an explicit list of abbreviations
it likes (deltatktbl) in the beginning of datetime.c that
forces "m" to "minute"? So losing the ambiguous ones
should be very easy.
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2008-09-12 02:44:49 | Better auth errors from libpq |
Previous Message | Tom Lane | 2008-09-12 00:32:06 | Re: Proposed patch: make SQL interval-literal syntax work per spec |