Thread: More on CURRENT_TIME and changes

More on CURRENT_TIME and changes

From
Andrew Sullivan
Date:
Hi,

After the recent thread on CURRENT_TIME, I thought the note in the b4
changelog odd:

2001-12-09 19:01  thomas

    * src/interfaces/odbc/: convert.c, odbc.sql: Support
    ODBC-style CURRENT_TIME, CURRENT_USER, etc with trailing
    empty parens. This is not SQL spec syntax, so later we will
    remove this extension from gram.y.

Ok, now I understand the reasoning behind adding this (ODBC
compliance) and the reasoning behind refusing to add it (SQL
compliance).  But why add it once, planning later to remove it?  This
strikes me as likely to cause the same sort of confusion as the
recent discusisons around LIMIT..OFFSET.  Why add a feature that you
are _planning_ to remove later?

A

--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


Re: More on CURRENT_TIME and changes

From
Thomas Lockhart
Date:
> After the recent thread on CURRENT_TIME, I thought the note in the b4
> changelog odd:
> 2001-12-09 19:01  thomas
>         * src/interfaces/odbc/: convert.c, odbc.sql: Support
>         ODBC-style CURRENT_TIME, CURRENT_USER, etc with trailing
>         empty parens. This is not SQL spec syntax, so later we will
>         remove this extension from gram.y.
> Ok, now I understand the reasoning behind adding this (ODBC
> compliance) and the reasoning behind refusing to add it (SQL
> compliance).  But why add it once, planning later to remove it?  This
> strikes me as likely to cause the same sort of confusion as the
> recent discusisons around LIMIT..OFFSET.  Why add a feature that you
> are _planning_ to remove later?

The (optional) parens were originally added to the main PostgreSQL
parser, gram.y, apparently to support some queries passed through ODBC.
But the architecture of the ODBC driver allows this problem to be
handled in the driver, which is where you have found this comment. So, I
added the feature to the driver, allowing gram.y to be cleaned up at a
later date (we were/are too close to the 7.2 release to allow me to
remove it now).

As far as I can tell, we should now not see a function call of the form
"CURRENT_TIME()" passing through ODBC without being changed to a form
which does not conflict with the SQL99 standard.

                    - Thomas

Re: More on CURRENT_TIME and changes

From
Andrew Sullivan
Date:
On Fri, Jan 04, 2002 at 05:08:45PM +0000, Thomas Lockhart wrote:

> So, I added the feature to the driver, allowing gram.y to be
> cleaned up at a later date (we were/are too close to the 7.2
> release to allow me to remove it now).

Doh!  Stupid me; I should read more carefully.  Can I plead too few
eyes, too little time?  Thanks for the clarification.

A

----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110