RE: UPDATE/INSERT BY NAME
Posted in 1992
In-Reply-To: <1f3ojnINN11g@emory.mathcs.emory.edu> obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler) TITLE: RE: UPDATE/INSERT BY NAME In <1f3ojnINN11g@emory.mathcs.emory.edu> Jonathan Leffler replies: [Acres of stuff deleted] > You asked for feedback from Informix, unofficially -- I gave mine. I > noted one supportive response from outside Informix. I haven't checked > with the other "corresponding members" of Informix to obtain their views, > and they may view the matter differently. I've never felt the need for > such a statement in the 6+ years I've been working with Informix products. > My view is not final; it is just a personal, over-stated opinion. > > I note that you have not taken the opportunity to re-state your case -- I > did invite such a restatement in my response because, as I say, I don't > have a copy of your original suggestion at hand to look at it again. You > can consider this a second offer to re-examine your suggestion, and I don't > mind whether you send the original again or an expanded or re-worded > version of it. > > I do think that the programs would be less clear as a result of using that > construct. The only other places where the BY NAME clause is used is in > the I/O side of I4GL, not the SQL side, so it would involve major changes > to the compiler to support it (not that the change would necessarily be > vetoed on that score). [More stuff deleted] > Now, apart from having to list the column names on the LHS of the equals, > this supplies all the functionality of your proposal, I think, rendering > most of your proposal redundant, unless your only objection was to having > to list the column names twice. I'd remain to be convinced that the saving > in programmer time from not having to list the names twice is anything but > negligible. Also, if the database changes, you are likely to have to > revise your program under either scheme. I saw the gains really in terms of some of the projects I manage here. The record lengths (*after* normalisation) are quite long. The functionality of the applications requires chunks of records to be updated at different times (you have to be there 8-)). I don't suppose that I'm in the minority of programmers who use DEFINE a RECORD LIKE b.* and happily use INPUT/DISPLAY BY NAME. It seemed to me to be a natural extention to existing facilites. It's true that for whole record updates UPDATE b SET * = a.* WHERE <whatever> is very simple. What I'm suggesting (I'm sorry I appear to be talking in circles) is a quicker method of partial updates. I would expect things like UPDATE BY NAME b SET a.* WHERE <whatever> and UPDATE BY NAME b SET a.field2 THRU a.field7 WHERE <whatever> to work also as a direct consequence. | I'd try and think up a witty .sig but who'd read it? | |------------------------------------------------------------| | Stuart Hemming | shemminga@cix.compulink.co.uk | | Tudor Labels Ltd | uunet!cix.compulink.co.uk!shemminga | | Roman Bank Bourne | Tel : (+44) 778 426444 | | Lincs PE10 9LQ. UK. | Fax : (+44) 778 421862 |