Re: [SQL] prob with aggregate and group by - returns multiples - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [SQL] prob with aggregate and group by - returns multiples
Date
Msg-id Pine.LNX.4.21.0002282202540.3511-100000@localhost.localdomain
Whole thread Raw
List pgsql-hackers
Tom Lane writes:

> > On a lesser note: I tried "select * into temp from hits" as per the doco,
> > but it barfs.
> 
> Postgres thinks that TEMP is a keyword, so it won't take it as a table
> name unless you put quotes around it.

This is really an unfortunate case where someone should have read the SQL
standard before putting in a feature. The SQL keyword is TEMPORARY, and
TEMP is really a popular name for a dummy table.

I tried making TEMP a ColId but it croaks on this syntactic contruct:

SELECT xxx INTO [TEMP] [TABLE] tablename

which is incidentally not SQL either. If someone is interested in allowing
'temp' as an identifier, there doesn't seem to be a good way without
requiring the TABLE keyword above. Would that be worth it for 7.0 maybe?

Of course the documentation should be changed to TEMPORARY as well in
various places.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Beta for 4:30AST ... ?