mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
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.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.103 2004/05/26 04:41:03 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.104 2004/05/30 23:40:25 neilc Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@@ -484,7 +484,7 @@ BuildDescForRelation(List *schema)
|
||||
/*
|
||||
* allocate a new tuple descriptor
|
||||
*/
|
||||
natts = length(schema);
|
||||
natts = list_length(schema);
|
||||
desc = CreateTemplateTupleDesc(natts, false);
|
||||
constr->has_not_null = false;
|
||||
|
||||
@@ -503,7 +503,7 @@ BuildDescForRelation(List *schema)
|
||||
|
||||
attname = entry->colname;
|
||||
atttypmod = entry->typename->typmod;
|
||||
attdim = length(entry->typename->arrayBounds);
|
||||
attdim = list_length(entry->typename->arrayBounds);
|
||||
|
||||
if (entry->typename->setof)
|
||||
ereport(ERROR,
|
||||
@@ -624,7 +624,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
|
||||
int varattno;
|
||||
|
||||
/* does the list length match the number of attributes? */
|
||||
if (length(colaliases) != natts)
|
||||
if (list_length(colaliases) != natts)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("number of aliases does not match number of columns")));
|
||||
@@ -632,7 +632,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
|
||||
/* OK, use the aliases instead */
|
||||
for (varattno = 0; varattno < natts; varattno++)
|
||||
{
|
||||
char *label = strVal(nth(varattno, colaliases));
|
||||
char *label = strVal(list_nth(colaliases, varattno));
|
||||
|
||||
if (label != NULL)
|
||||
namestrcpy(&(tupdesc->attrs[varattno]->attname), label);
|
||||
@@ -655,7 +655,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
|
||||
errmsg("no column alias was provided")));
|
||||
|
||||
/* the alias list length must be 1 */
|
||||
if (length(colaliases) != 1)
|
||||
if (list_length(colaliases) != 1)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("number of aliases does not match number of columns")));
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.11 2004/05/26 04:41:05 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.12 2004/05/30 23:40:25 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ forget_matching_split(Relation reln, RelFileNode node,
|
||||
{
|
||||
if (is_root != split->is_root)
|
||||
elog(LOG, "forget_matching_split: fishy is_root data");
|
||||
incomplete_splits = lremove(split, incomplete_splits);
|
||||
incomplete_splits = list_delete_ptr(incomplete_splits, split);
|
||||
break; /* need not look further */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user