Re: More on CURRENT_TIME and changes - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: More on CURRENT_TIME and changes
Date
Msg-id 3C35E19D.1F86B935@fourpalms.org
Whole thread Raw
In response to More on CURRENT_TIME and changes  (Andrew Sullivan <andrew@libertyrms.info>)
Responses Re: More on CURRENT_TIME and changes  (Andrew Sullivan <andrew@libertyrms.info>)
List pgsql-general
> 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

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: More on CURRENT_TIME and changes
Next
From: Kaare Rasmussen
Date:
Subject: Re: PostgreSQL GUI