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:
@@ -15,13 +15,11 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.283 2004/05/26 13:56:47 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.284 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define DISABLE_LIST_COMPAT
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "nodes/parsenodes.h"
|
||||
|
||||
@@ -18,13 +18,11 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.222 2004/05/26 13:56:47 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.223 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define DISABLE_LIST_COMPAT
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "nodes/params.h"
|
||||
|
||||
@@ -9,12 +9,10 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/list.c,v 1.57 2004/05/26 04:41:19 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/list.c,v 1.58 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#define DISABLE_LIST_COMPAT
|
||||
|
||||
#include "postgres.h"
|
||||
#include "nodes/pg_list.h"
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.43 2004/05/10 22:44:44 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.44 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ makeSimpleA_Expr(A_Expr_Kind kind, const char *name,
|
||||
A_Expr *a = makeNode(A_Expr);
|
||||
|
||||
a->kind = kind;
|
||||
a->name = makeList1(makeString((char *) name));
|
||||
a->name = list_make1(makeString((char *) name));
|
||||
a->lexpr = lexpr;
|
||||
a->rexpr = rexpr;
|
||||
return a;
|
||||
@@ -259,7 +259,7 @@ makeTypeName(char *typnam)
|
||||
{
|
||||
TypeName *n = makeNode(TypeName);
|
||||
|
||||
n->names = makeList1(makeString(typnam));
|
||||
n->names = list_make1(makeString(typnam));
|
||||
n->typmod = -1;
|
||||
return n;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.237 2004/05/26 04:41:19 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.238 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every node type that can appear in stored rules' parsetrees *must*
|
||||
@@ -19,8 +19,6 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#define DISABLE_LIST_COMPAT
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.67 2004/05/26 04:41:19 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.68 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -333,7 +333,7 @@ print_expr(Node *expr, List *rtable)
|
||||
RangeTblEntry *rte;
|
||||
|
||||
Assert(var->varno > 0 &&
|
||||
(int) var->varno <= length(rtable));
|
||||
(int) var->varno <= list_length(rtable));
|
||||
rte = rt_fetch(var->varno, rtable);
|
||||
relname = rte->eref->aliasname;
|
||||
attname = get_rte_attribute_name(rte, var->varattno);
|
||||
@@ -378,7 +378,7 @@ print_expr(Node *expr, List *rtable)
|
||||
char *opname;
|
||||
|
||||
opname = get_opname(e->opno);
|
||||
if (length(e->args) > 1)
|
||||
if (list_length(e->args) > 1)
|
||||
{
|
||||
print_expr(get_leftop((Expr *) e), rtable);
|
||||
printf(" %s ", ((opname != NULL) ? opname : "(invalid operator)"));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/read.c,v 1.42 2004/05/26 04:41:19 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/read.c,v 1.43 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -327,7 +327,7 @@ nodeRead(char *token, int tok_len)
|
||||
if (endptr != token + tok_len)
|
||||
elog(ERROR, "unrecognized integer: \"%.*s\"",
|
||||
tok_len, token);
|
||||
l = lappendi(l, val);
|
||||
l = lappend_int(l, val);
|
||||
}
|
||||
}
|
||||
else if (tok_len == 1 && token[0] == 'o')
|
||||
@@ -347,7 +347,7 @@ nodeRead(char *token, int tok_len)
|
||||
if (endptr != token + tok_len)
|
||||
elog(ERROR, "unrecognized OID: \"%.*s\"",
|
||||
tok_len, token);
|
||||
l = lappendo(l, val);
|
||||
l = lappend_oid(l, val);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.170 2004/05/26 04:41:19 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.171 2004/05/30 23:40:27 neilc Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Path and Plan nodes do not have any readfuncs support, because we
|
||||
@@ -18,8 +18,6 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#define DISABLE_LIST_COMPAT
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
Reference in New Issue
Block a user