Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA68070; Tue, 29 Feb 2000 11:11:05 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA29207; Tue, 29 Feb 2000 11:09:37 -0500 (EST) To: Don Baccus cc: Thomas Lockhart , Bruce Momjian , "'pgsql-sql@postgresql.org'" , PostgreSQL Development Subject: Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiplesh In-reply-to: <3.0.1.32.20000229063525.01d06150@mail.pacifier.com> References: <200002290559.AAA10605@candle.pha.pa.us> <3.0.1.32.20000229063525.01d06150@mail.pacifier.com> Comments: In-reply-to Don Baccus message dated "Tue, 29 Feb 2000 06:35:25 -0800" Date: Tue, 29 Feb 2000 11:09:37 -0500 Message-ID: <29204.951840577@sss.pgh.pa.us> From: Tom Lane Don Baccus writes: > I vote for the SQL92 TEMPORARY. Let's not add a keyword that is non-standard > just because one or another commercial database makes use of it, You're missing the point: we are not talking about *adding* a keyword, we're talking about *removing* one that we've already supported for a year or so. That changes matters considerably, IMHO. I have in fact been able to make a conflict-free grammar in which TEMP is accepted but not reserved. It requires a certain amount of redundancy in the productions (see below), but I think this is a worthwhile tradeoff for not breaking existing user code. Shall I commit this? regards, tom lane /* * Redundancy here is needed to avoid shift/reduce conflicts, * since TEMP is not a reserved word. See also OptTemp. * * The result is a cons cell (not a true list!) containing * a boolean and a table name. */ OptTempTableName: TEMPORARY opt_table relation_name { $$ = lcons(makeInteger(TRUE), (List *) $3); } | TEMP opt_table relation_name { $$ = lcons(makeInteger(TRUE), (List *) $3); } | LOCAL TEMPORARY opt_table relation_name { $$ = lcons(makeInteger(TRUE), (List *) $4); } | LOCAL TEMP opt_table relation_name { $$ = lcons(makeInteger(TRUE), (List *) $4); } | GLOBAL TEMPORARY opt_table relation_name { elog(ERROR, "GLOBAL TEMPORARY TABLE is not currently supported"); $$ = lcons(makeInteger(TRUE), (List *) $4); } | GLOBAL TEMP opt_table relation_name { elog(ERROR, "GLOBAL TEMPORARY TABLE is not currently supported"); $$ = lcons(makeInteger(TRUE), (List *) $4); } | TABLE relation_name { $$ = lcons(makeInteger(FALSE), (List *) $2); } | relation_name { $$ = lcons(makeInteger(FALSE), (List *) $1); } ;