Re: [SQL] prob with aggregate and group by - returns multiples

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: George Dau <gedau(at)isa(dot)mim(dot)com(dot)au>, "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [SQL] prob with aggregate and group by - returns multiples
Date: 2000-02-28 23:19:05
Message-ID: Pine.LNX.4.21.0002282202540.3511-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-02-28 23:19:22 Re: [HACKERS] Beta for 4:30AST ... ?
Previous Message Don Baccus 2000-02-28 22:37:02 Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-02-29 05:44:22 Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiples
Previous Message Tom Lane 2000-02-28 22:53:09 Re: [SQL] prob with aggregate and group by - returns multiples