pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Don Baccus <dhogaza@pacifier.com>
Cc: Thomas Lockhart <lockhart@alumni.caltech.edu>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: 'pgsql-sql@postgresql.org' <pgsql-sql@postgreSQL.org>
Cc: PostgreSQL Development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiplesh
Date: Tue, 29 Feb 2000 11:09:37 -0500
Message-ID: <29204.951840577@sss.pgh.pa.us> (raw)
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>

Don Baccus <dhogaza@pacifier.com> 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); }
        ;



view thread (24+ messages)  latest in thread

Message-ID: <29204.951840577@sss.pgh.pa.us>
Permalink:  ../29204.951840577@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29204.951840577@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dhogaza@pacifier.com, lockhart@alumni.caltech.edu, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
  Subject: Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiplesh
  In-Reply-To: <29204.951840577@sss.pgh.pa.us>
  References: <200002290559.AAA10605@candle.pha.pa.us> <3.0.1.32.20000229063525.01d06150@mail.pacifier.com> <29204.951840577@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox