diff options
author | Neil Conway <neilc@samurai.com> | 2004-05-30 23:40:41 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2004-05-30 23:40:41 +0000 |
commit | 72b6ad6313387110cb36b69a3732cd0936c3eba4 (patch) | |
tree | e43da77aaeb3a9d7f4997ddb2b91ae88001ea462 /src/backend/optimizer/util/restrictinfo.c | |
parent | ec0b1f271639ff0fafd1310de3c47cbb214c6294 (diff) | |
download | postgresql-72b6ad6313387110cb36b69a3732cd0936c3eba4.tar.gz postgresql-72b6ad6313387110cb36b69a3732cd0936c3eba4.zip |
Use the new List API function names throughout the backend, and disable the
list compatibility API by default. While doing this, I decided to keep
the llast() macro around and introduce llast_int() and llast_oid() variants.
Diffstat (limited to 'src/backend/optimizer/util/restrictinfo.c')
-rw-r--r-- | src/backend/optimizer/util/restrictinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c index 1cb446e44fa..9786adb551c 100644 --- a/src/backend/optimizer/util/restrictinfo.c +++ b/src/backend/optimizer/util/restrictinfo.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.27 2004/05/26 04:41:27 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.28 2004/05/30 23:40:31 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -99,7 +99,7 @@ make_restrictinfo_from_indexclauses(List *indexclauses, if (indexclauses == NIL) return NIL; /* If single indexscan, just return the ANDed clauses */ - if (length(indexclauses) == 1) + if (list_length(indexclauses) == 1) return (List *) linitial(indexclauses); /* Else we need an OR RestrictInfo structure */ foreach(orlist, indexclauses) @@ -112,7 +112,7 @@ make_restrictinfo_from_indexclauses(List *indexclauses, andlist = get_actual_clauses(andlist); withoutris = lappend(withoutris, make_ands_explicit(andlist)); } - return makeList1(make_restrictinfo_internal(make_orclause(withoutris), + return list_make1(make_restrictinfo_internal(make_orclause(withoutris), make_orclause(withris), is_pushed_down, valid_everywhere)); @@ -139,7 +139,7 @@ make_restrictinfo_internal(Expr *clause, Expr *orclause, * If it's a binary opclause, set up left/right relids info. * In any case set up the total clause relids info. */ - if (is_opclause(clause) && length(((OpExpr *) clause)->args) == 2) + if (is_opclause(clause) && list_length(((OpExpr *) clause)->args) == 2) { restrictinfo->left_relids = pull_varnos(get_leftop(clause)); restrictinfo->right_relids = pull_varnos(get_rightop(clause)); @@ -350,7 +350,7 @@ remove_redundant_join_clauses(Query *root, List *restrictinfo_list, else if (CLAUSECOST(rinfo) < CLAUSECOST(prevrinfo)) { /* keep this one, drop the previous one */ - result = lremove(prevrinfo, result); + result = list_delete_ptr(result, prevrinfo); result = lappend(result, rinfo); } /* else, drop this one */ |