Re: [HACKERS] Fixes gram.y

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 20:25:13
Message-ID: 200203202025.g2KKPD314154@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> 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.

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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-03-20 20:27:56 Re: Notify argument?
Previous Message Tom Lane 2002-03-20 20:24:52 Re: Domains and type coercion

Browse pgsql-patches by date

  From Date Subject
Next Message Fernando Nasser 2002-03-20 20:58:30 Re: Domain Support -- another round
Previous Message Tom Lane 2002-03-20 20:08:53 Re: Domain Support -- another round