Did time become a keyword in 7.2? 7.1.3 allowed it as a column name... 
7.2 rejects it.

Tks


Thu, 03 Jan 2002 22:20:21 -0500
Dwayne Miller <dwayne-miller@home.com>
Time as keyword
Dwayne Miller <dwayne-miller@home.com> writes:
> Did time become a keyword in 7.2? 7.1.3 allowed it as a column name... 
> 7.2 rejects it.

It's always been a keyword, but it is "more reserved" than it used to
be.  See

http://developer.postgresql.org/docs/postgres/sql-keywords-appendix.html

However, according to that list TIME is still allowed as a column name,
and indeed I get:

regression=# create table foo (f1 time, time time);
CREATE

So I'm not sure what you did.

			regards, tom lane

Tue, 08 Jan 2002 09:44:49 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Time as keyword 
On Thu, Jan 03, 2002 at 10:20:21PM -0500, Dwayne Miller wrote:
> Did time become a keyword in 7.2?

$ grep TIME src/backend/parser/keywords.c 
	{"current_time", CURRENT_TIME},
	{"current_timestamp", CURRENT_TIMESTAMP},
	{"time", TIME},
	{"timestamp", TIMESTAMP},
-- 
Holger Krug
hkrug@rationalizer.com

Tue, 8 Jan 2002 16:13:22 +0100
Holger Krug <hkrug@rationalizer.com>
Re: Time as keyword
> Did time become a keyword in 7.2? 7.1.3 allowed it as a column name...
> 7.2 rejects it.

Yes. We now support SQL99 time and timestamp precision, which require
that TIME(p) be a type specification. So there are parts of the grammar
which cannot easily fit "time" anymore.

You could/should use the SQL99 list of reserved words as a guide for
which keywords to *not* use, even though some of them are currently
accepted as, for example, column names. In the meantime, you can
double-quote the column name if you really need it to stay "time".

                  - Thomas

Tue, 08 Jan 2002 17:00:03 +0000
Thomas Lockhart <lockhart@fourpalms.org>
Re: Time as keyword
I tried to create table foo (t time, time time); and received an error 
something like
'Error parsing near time'

I'm on 7.2.b2

I'll upgrade and try again.


Tom Lane wrote:

>Dwayne Miller <dwayne-miller@home.com> writes:
>
>>Did time become a keyword in 7.2? 7.1.3 allowed it as a column name... 
>>7.2 rejects it.
>>
>
>It's always been a keyword, but it is "more reserved" than it used to
>be.  See
>
>http://developer.postgresql.org/docs/postgres/sql-keywords-appendix.html
>
>However, according to that list TIME is still allowed as a column name,
>and indeed I get:
>
>regression=# create table foo (f1 time, time time);
>CREATE
>
>So I'm not sure what you did.
>
>			regards, tom lane
>



Wed, 09 Jan 2002 09:52:43 -0500
Dwayne Miller <dwayne-miller@home.com>
Re: Time as keyword