1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Remove 'Array' node type, which has evidently been dead code for

a very long time.
This commit is contained in:
Tom Lane
2000-07-22 04:22:47 +00:00
parent 1afdccc8b2
commit 4bdb348628
6 changed files with 13 additions and 154 deletions

View File

@@ -19,7 +19,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.117 2000/07/17 03:04:58 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.118 2000/07/22 04:22:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -933,26 +933,6 @@ _copyCaseWhen(CaseWhen *from)
return newnode;
}
static Array *
_copyArray(Array *from)
{
Array *newnode = makeNode(Array);
/* ----------------
* copy remainder of node
* ----------------
*/
newnode->arrayelemtype = from->arrayelemtype;
newnode->arrayelemlength = from->arrayelemlength;
newnode->arrayelembyval = from->arrayelembyval;
newnode->arrayndim = from->arrayndim;
newnode->arraylow = from->arraylow;
newnode->arrayhigh = from->arrayhigh;
newnode->arraylen = from->arraylen;
return newnode;
}
static ArrayRef *
_copyArrayRef(ArrayRef *from)
{
@@ -1724,9 +1704,6 @@ copyObject(void *from)
case T_Func:
retval = _copyFunc(from);
break;
case T_Array:
retval = _copyArray(from);
break;
case T_ArrayRef:
retval = _copyArrayRef(from);
break;

View File

@@ -24,7 +24,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.69 2000/07/17 03:05:01 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.70 2000/07/22 04:22:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -293,25 +293,6 @@ _equalRelabelType(RelabelType *a, RelabelType *b)
return true;
}
static bool
_equalArray(Array *a, Array *b)
{
if (a->arrayelemtype != b->arrayelemtype)
return false;
/* We need not check arrayelemlength, arrayelembyval if types match */
if (a->arrayndim != b->arrayndim)
return false;
/* XXX shouldn't we be checking all indices??? */
if (a->arraylow.indx[0] != b->arraylow.indx[0])
return false;
if (a->arrayhigh.indx[0] != b->arrayhigh.indx[0])
return false;
if (a->arraylen != b->arraylen)
return false;
return true;
}
static bool
_equalArrayRef(ArrayRef *a, ArrayRef *b)
{
@@ -800,9 +781,6 @@ equal(void *a, void *b)
case T_Func:
retval = _equalFunc(a, b);
break;
case T_Array:
retval = _equalArray(a, b);
break;
case T_ArrayRef:
retval = _equalArrayRef(a, b);
break;

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.123 2000/07/17 03:05:01 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.124 2000/07/22 04:22:46 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -770,29 +770,6 @@ _outRelabelType(StringInfo str, RelabelType *node)
node->resulttype, node->resulttypmod);
}
/*
* Array is a subclass of Expr
*/
static void
_outArray(StringInfo str, Array *node)
{
int i;
appendStringInfo(str,
" ARRAY :arrayelemtype %u :arrayelemlength %d :arrayelembyval %c ",
node->arrayelemtype,
node->arrayelemlength,
node->arrayelembyval ? 't' : 'f');
appendStringInfo(str, " :arrayndim %d :arraylow ", node->arrayndim);
for (i = 0; i < node->arrayndim; i++)
appendStringInfo(str, " %d ", node->arraylow.indx[i]);
appendStringInfo(str, " :arrayhigh ");
for (i = 0; i < node->arrayndim; i++)
appendStringInfo(str, " %d ", node->arrayhigh.indx[i]);
appendStringInfo(str, " :arraylen %d ", node->arraylen);
}
/*
* ArrayRef is a subclass of Expr
*/
@@ -1508,9 +1485,6 @@ _outNode(StringInfo str, void *obj)
case T_RelabelType:
_outRelabelType(str, obj);
break;
case T_Array:
_outArray(str, obj);
break;
case T_ArrayRef:
_outArrayRef(str, obj);
break;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.93 2000/07/17 03:05:01 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.94 2000/07/22 04:22:46 tgl Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -814,48 +814,6 @@ _readVar()
return local_node;
}
/* ----------------
* _readArray
*
* Array is a subclass of Expr
* ----------------
*/
static Array *
_readArray()
{
Array *local_node;
char *token;
int length;
local_node = makeNode(Array);
token = lsptok(NULL, &length); /* eat :arrayelemtype */
token = lsptok(NULL, &length); /* get arrayelemtype */
local_node->arrayelemtype = strtoul(token, NULL, 10);
token = lsptok(NULL, &length); /* eat :arrayelemlength */
token = lsptok(NULL, &length); /* get arrayelemlength */
local_node->arrayelemlength = atoi(token);
token = lsptok(NULL, &length); /* eat :arrayelembyval */
token = lsptok(NULL, &length); /* get arrayelembyval */
local_node->arrayelembyval = (token[0] == 't') ? true : false;
token = lsptok(NULL, &length); /* eat :arraylow */
token = lsptok(NULL, &length); /* get arraylow */
local_node->arraylow.indx[0] = atoi(token);
token = lsptok(NULL, &length); /* eat :arrayhigh */
token = lsptok(NULL, &length); /* get arrayhigh */
local_node->arrayhigh.indx[0] = atoi(token);
token = lsptok(NULL, &length); /* eat :arraylen */
token = lsptok(NULL, &length); /* get arraylen */
local_node->arraylen = atoi(token);
return local_node;
}
/* ----------------
* _readArrayRef
*
@@ -1835,8 +1793,6 @@ parsePlanString(void)
return_value = _readExpr();
else if (length == 8 && strncmp(token, "ARRAYREF", length) == 0)
return_value = _readArrayRef();
else if (length == 5 && strncmp(token, "ARRAY", length) == 0)
return_value = _readArray();
else if (length == 3 && strncmp(token, "VAR", length) == 0)
return_value = _readVar();
else if (length == 4 && strncmp(token, "ATTR", length) == 0)