Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2002-03-20 20:27:56
Subject: Re: Notify argument?
Previous:From: Tom LaneDate: 2002-03-20 20:24:52
Subject: Re: Domains and type coercion

pgsql-patches by date

Next:From: Fernando NasserDate: 2002-03-20 20:58:30
Subject: Re: Domain Support -- another round
Previous:From: Tom LaneDate: 2002-03-20 20:08:53
Subject: Re: Domain Support -- another round

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group