diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-11 20:46:47 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-11 20:46:47 +0000 |
commit | 88381ade63de931c84f53dc873c986d40b8c8b61 (patch) | |
tree | 1ec3c77e29b1d320718b64b38db10f8a8f0e0cd3 /src/backend/utils/adt/not_in.c | |
parent | cae912d05bfb354d81427c6ae5354eab90869fe9 (diff) | |
download | postgresql-88381ade63de931c84f53dc873c986d40b8c8b61.tar.gz postgresql-88381ade63de931c84f53dc873c986d40b8c8b61.zip |
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().
Diffstat (limited to 'src/backend/utils/adt/not_in.c')
-rw-r--r-- | src/backend/utils/adt/not_in.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/not_in.c b/src/backend/utils/adt/not_in.c index a92c13841fc..42ce2d2fcbd 100644 --- a/src/backend/utils/adt/not_in.c +++ b/src/backend/utils/adt/not_in.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.35 2003/08/04 02:40:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.36 2003/08/11 20:46:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ int4notin(PG_FUNCTION_ARGS) (errcode(ERRCODE_INVALID_NAME), errmsg("invalid name syntax"), errhint("Must provide \"relationname.attributename\"."))); - attribute = strVal(nth(nnames - 1, names)); + attribute = strVal(llast(names)); names = ltruncate(nnames - 1, names); relrv = makeRangeVarFromNameList(names); |