aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_coerce.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-05-30 23:40:41 +0000
committerNeil Conway <neilc@samurai.com>2004-05-30 23:40:41 +0000
commit72b6ad6313387110cb36b69a3732cd0936c3eba4 (patch)
treee43da77aaeb3a9d7f4997ddb2b91ae88001ea462 /src/backend/parser/parse_coerce.c
parentec0b1f271639ff0fafd1310de3c47cbb214c6294 (diff)
downloadpostgresql-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/parser/parse_coerce.c')
-rw-r--r--src/backend/parser/parse_coerce.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index ba3210946ab..9ba0bdc90f9 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.116 2004/05/26 04:41:30 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.117 2004/05/30 23:40:35 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -245,7 +245,7 @@ coerce_type(ParseState *pstate, Node *node,
Oid baseTypeId = getBaseType(targetTypeId);
result = (Node *) makeFuncExpr(funcId, baseTypeId,
- makeList1(node),
+ list_make1(node),
cformat);
/*
@@ -508,7 +508,7 @@ coerce_type_typmod(Node *node, Oid targetTypeId, int32 targetTypMod,
false,
true);
- args = makeList2(node, cons);
+ args = list_make2(node, cons);
if (nargs == 3)
{
@@ -562,7 +562,7 @@ coerce_record_to_complex(ParseState *pstate, Node *node,
rte = GetRTEByRangeTablePosn(pstate,
((Var *) node)->varno,
((Var *) node)->varlevelsup);
- nfields = length(rte->eref->colnames);
+ nfields = list_length(rte->eref->colnames);
for (nf = 1; nf <= nfields; nf++)
{
Oid vartype;
@@ -585,7 +585,7 @@ coerce_record_to_complex(ParseState *pstate, Node *node,
format_type_be(targetTypeId))));
tupdesc = lookup_rowtype_tupdesc(targetTypeId, -1);
- if (length(args) != tupdesc->natts)
+ if (list_length(args) != tupdesc->natts)
ereport(ERROR,
(errcode(ERRCODE_CANNOT_COERCE),
errmsg("cannot cast type %s to %s",
@@ -728,7 +728,7 @@ select_common_type(List *typeids, const char *context)
for_each_cell(type_item, lnext(list_head(typeids)))
{
- Oid ntype = getBaseType(lfirsto(type_item));
+ Oid ntype = getBaseType(lfirst_oid(type_item));
/* move on to next one if no new information... */
if ((ntype != InvalidOid) && (ntype != UNKNOWNOID) && (ntype != ptype))