Hi Thomas,

I observe that gram.y's <res_target_list> nonterminal is only used in
UPDATE statements.  It accepts a lot too much for that purpose; the
following sorts of things get by the grammar, only to fail later on:

	UPDATE table SET *;
	UPDATE table SET table.column;
	UPDATE table SET table.*;

None of these are valid according to SQL92 or have any visible use.

I propose renaming res_target_list and res_target_el to
update_target_list and update_target_el, and removing the alternatives
that aren't actually valid for UPDATE.

Having done that, we might as well rename res_target_list2 and
res_target_el2 to something clearer (I'm thinking just target_list and
target_el, but if you want to keep the "res_" I won't object).

Comments, objections?

			regards, tom lane

Sun, 11 Jul 1999 15:37:32 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Overgenerous parsing of UPDATE targetlist
> Having done that, we might as well rename res_target_list2 and
> res_target_el2 to something clearer (I'm thinking just target_list and
> target_el, but if you want to keep the "res_" I won't object).

Anything would be clearer than what is there now.  Please give them nice
names too, if possible.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@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

Sun, 11 Jul 1999 22:11:04 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Overgenerous parsing of UPDATE targetlist
> I propose renaming res_target_list and res_target_el to
> update_target_list and update_target_el, and removing the alternatives
> that aren't actually valid for UPDATE.
> Having done that, we might as well rename res_target_list2 and
> res_target_el2 to something clearer (I'm thinking just target_list and
> target_el, but if you want to keep the "res_" I won't object).

Sounds good. I never poked very far into the usage of these clauses,
but istm that your suggestions would make things clearer.

                    - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Wed, 14 Jul 1999 15:20:39 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: Overgenerous parsing of UPDATE targetlist