Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4bdb3486
Commit
4bdb3486
authored
Jul 22, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove 'Array' node type, which has evidently been dead code for
a very long time.
parent
1afdccc8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
154 deletions
+13
-154
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+1
-24
src/backend/nodes/equalfuncs.c
src/backend/nodes/equalfuncs.c
+1
-23
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+1
-27
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+1
-45
src/include/nodes/nodes.h
src/include/nodes/nodes.h
+2
-2
src/include/nodes/primnodes.h
src/include/nodes/primnodes.h
+7
-33
No files found.
src/backend/nodes/copyfuncs.c
View file @
4bdb3486
...
...
@@ -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.11
7 2000/07/17 03:04:58
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.11
8 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
;
...
...
src/backend/nodes/equalfuncs.c
View file @
4bdb3486
...
...
@@ -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
;
...
...
src/backend/nodes/outfuncs.c
View file @
4bdb3486
...
...
@@ -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.12
3 2000/07/17 03:05:01
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.12
4 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
;
...
...
src/backend/nodes/readfuncs.c
View file @
4bdb3486
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.9
3 2000/07/17 03:05:01
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.9
4 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
)
...
...
src/include/nodes/nodes.h
View file @
4bdb3486
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: nodes.h,v 1.7
1 2000/07/14 15:43:51 thomas
Exp $
* $Id: nodes.h,v 1.7
2 2000/07/22 04:22:47 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -64,7 +64,7 @@ typedef enum NodeTag
T_Aggref
,
T_SubLink
,
T_Func
,
T_Array
,
T_Array
XXX
,
/* not used anymore; this tag# is available */
T_ArrayRef
,
T_Iter
,
T_RelabelType
,
...
...
src/include/nodes/primnodes.h
View file @
4bdb3486
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: primnodes.h,v 1.4
4 2000/07/17 03:05:2
7 tgl Exp $
* $Id: primnodes.h,v 1.4
5 2000/07/22 04:22:4
7 tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -389,33 +389,6 @@ typedef struct SubLink
Node
*
subselect
;
}
SubLink
;
/* ----------------
* Array
* arrayelemtype - type of the array's elements (homogenous!)
* arrayelemlength - length of that type
* arrayelembyval - is the element type pass-by-value?
* arrayndim - number of dimensions of the array
* arraylow - base for array indexing
* arrayhigh - limit for array indexing
* arraylen - total length of array object
* ----------------
*
* memo from mao: the array support we inherited from 3.1 is just
* wrong. when time exists, we should redesign this stuff to get
* around a bunch of unfortunate implementation decisions made there.
*/
typedef
struct
Array
{
NodeTag
type
;
Oid
arrayelemtype
;
int
arrayelemlength
;
bool
arrayelembyval
;
int
arrayndim
;
IntArray
arraylow
;
IntArray
arrayhigh
;
int
arraylen
;
}
Array
;
/* ----------------
* ArrayRef: describes an array subscripting operation
*
...
...
@@ -423,11 +396,12 @@ typedef struct Array
* fetching a subarray (array slice), storing a single element into
* an array, or storing a slice. The "store" cases work with an
* initial array value and a source value that is inserted into the
* appropriate part of the array.
* appropriate part of the array; the result of the operation is an
* entire new modified array value.
*
* refattrlength - t
otal length of array object
* refelemtype - type of the result of the
subscript
operation
* refelemlength -
length
of the array element type
* refattrlength - t
yplen of array type
* refelemtype - type of the result of the
ArrayRef
operation
* refelemlength -
typlen
of the array element type
* refelembyval - is the element type pass-by-value?
* refupperindexpr - expressions that evaluate to upper array indexes
* reflowerindexpr - expressions that evaluate to lower array indexes
...
...
@@ -449,7 +423,7 @@ typedef struct Array
* Note: currently, refelemtype is NOT the element type, but the array type,
* when doing subarray fetch or either type of store. It would be cleaner
* to add more fields so we can distinguish the array element type from the
* result type of the
subscript
operator...
* result type of the
ArrayRef
operator...
* ----------------
*/
typedef
struct
ArrayRef
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment