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

From Bruce Momjian
Subject Re: [PATCHES] Fixes gram.y
Date
Msg-id 200203202025.g2KKPD314154@candle.pha.pa.us
Whole thread Raw
In response to Re: [PATCHES] Fixes gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.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.

Yep, makes sense.

> > CLOSE   -> CLOSE CURSOR
> > DECLARE -> DECLARE CURSOR
> > No opinion here.
>
> No strong feeling here either.

Seems like extra noise.  Not sure either.

>
> > COMMIT   -> COMMIT WORK
> > ROLLBACK -> ROLLBACK WORK
> > Doesn't matter to me.
>
> I'd vote against changing these.

OK.

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

Hard to imagine what logic you would use to add the word WHERE.  What if
they do a DELETE without a WHERE?


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

Yes, the problem here is that we have so many SET variables that aren't
standard, do we print the standard tags for the standard ones and just
SET VARIABLE for the others?  Doesn't seem worth it.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Domains and type coercion
Next
From: Igor Kovalenko
Date:
Subject: Re: Fw: Fw: bad performance on irix