Re: [PATCHES] Fixes gram.y - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCHES] Fixes gram.y
Date
Msg-id Pine.LNX.4.30.0203201157210.812-100000@peter.localdomain
Whole thread Raw
In response to Re: [PATCHES] Fixes gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Fixes gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> Peter Eisentraut <peter_e@gmx.net> writes:
> >> What's standard about it?
>
> > ISO/IEC 9075-2:1999 clause 19.1 general rule 1 c) to be exact. ;-)
>
> Hmm.  Looks like we need a wholesale revision of command tags, indeed.
> At least if we want to consider command tags to be the data that
> satisfies this spec requirement.

We would need to do:

ALTER  -> ALTER <type of object>
DROP   -> DROP <type of object>
CREATE -> CREATE <type of object>

Those look reasonable, and we already do that in some cases.

CLOSE   -> CLOSE CURSOR
DECLARE -> DECLARE CURSOR

No opinion here.

COMMIT   -> COMMIT WORK
ROLLBACK -> ROLLBACK WORK

Doesn't matter to me.

DELETE -> DELETE WHERE
UPDATE -> UPDATE WHERE

I'd prefer not to do those.

SET CONSTRAINTS -> SET CONSTRAINT [sic]
SET VARIABLE    -> SET TIME ZONE
SET VARIABLE    -> SET TRANSACTION
SET VARIABLE    -> SET SESSION AUTHORIZATION

The first one looks like a mistake.  The other ones we could work on.

It also seems to me that CREATE TABLE AS should not print "SELECT".  I
thought Fernando Nasser had fixed that.  Maybe I'm not completely up to
date in my sources.

--
Peter Eisentraut   peter_e@gmx.net


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: Again, sorry, caching.
Next
From: Vince Vielhaber
Date:
Subject: Re: XML