Re: [HACKERS] Fixes gram.y

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Rod Taylor <rbt(at)zort(dot)ca>, pgsql-patches(at)postgresql(dot)org, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Fixes gram.y
Date: 2002-03-20 17:45:11
Message-ID: 21084.1016646311@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> Hmm. Looks like we need a wholesale revision of command tags, indeed.

> 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.

These seem okay to me.

> CLOSE -> CLOSE CURSOR
> DECLARE -> DECLARE CURSOR
> No opinion here.

No strong feeling here either.

> COMMIT -> COMMIT WORK
> ROLLBACK -> ROLLBACK WORK
> Doesn't matter to me.

I'd vote against changing these.

> DELETE -> DELETE WHERE
> UPDATE -> UPDATE WHERE
> I'd prefer not to do those.

If we change these we will break existing client code that expects a
particular format for these tags (so it can pull out the row count).
Definitely a "no change" vote here.

> 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.

I'd say leave them all as "SET VARIABLE". There's no real information
gain here, and I'm a tad worried about overflowing limited command-tag
buffers in clients.

> It also seems to me that CREATE TABLE AS should not print "SELECT". I
> thought Fernando Nasser had fixed that.

No, I think it's still on his to-do list (we didn't like his first
proposed patch for it).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fernando Nasser 2002-03-20 18:14:29 Re: [HACKERS] Fixes gram.y
Previous Message Bear Giles 2002-03-20 17:40:49 Re: XML

Browse pgsql-patches by date

  From Date Subject
Next Message Fernando Nasser 2002-03-20 18:14:29 Re: [HACKERS] Fixes gram.y
Previous Message Peter Eisentraut 2002-03-20 17:15:19 Re: [HACKERS] Fixes gram.y