Bernt M. Johnsen wrote:
I suggest an extension to the standard since the syntax for <interval
primary> is a bit awkward (and far beyond the ability to numerous
application programmers)

<time zone> ::= AT <time zone specifier>
<time zone specifier> ::=
            LOCAL
          | TIME ZONE <interval primary>
          | TIME ZONE <time zone offset>
          | UTC

where <time zone offset> is a 5-character string with a sign and 4
digits in the form HHMM to specify the offset. Thus

SELECT ts AT TIME ZONE '-0700' FROM table;

Just let the <time zone offset> have the same syntax as the string value in an <interval literal> used for time zones, ie hour-to-minute intervals: '[<sign>]HH:MM'.

So my suggestion is:
 - Require the colon to make it compliant with the interval literal string.
 - Make the sign optional.

BTW, having a sign within the string literal is actually non-standard. The standard says that there may be a sign in front of the string, but this is fairly awkward when generating prepared statements that can be used within any time zone.

Roy

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to