Code cleanup inspired by recent resname bug report (doesn't fix the bug
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 11 Aug 2003 20:46:47 +0000 (20:46 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 11 Aug 2003 20:46:47 +0000 (20:46 +0000)
commit88381ade63de931c84f53dc873c986d40b8c8b61
tree1ec3c77e29b1d320718b64b38db10f8a8f0e0cd3
parentcae912d05bfb354d81427c6ae5354eab90869fe9
Code cleanup inspired by recent resname bug report (doesn't fix the bug
yet, though).  Avoid using nth() to fetch tlist entries; provide a
common routine get_tle_by_resno() to search a tlist for a particular
resno.  This replaces a couple uses of nth() and a dozen hand-coded
search loops.  Also, replace a few uses of nth(length-1, list) with
llast().
12 files changed:
src/backend/catalog/pg_proc.c
src/backend/commands/comment.c
src/backend/commands/explain.c
src/backend/executor/execJunk.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/createplan.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/rewrite/rewriteManip.c
src/backend/utils/adt/not_in.c
src/backend/utils/adt/tid.c
src/include/parser/parsetree.h