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
8edbc3bd
Commit
8edbc3bd
authored
Nov 04, 1996
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ARRAY_PATCH define
parent
e43dfad2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
21 deletions
+2
-21
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+1
-7
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayfuncs.c
+1
-13
src/include/config.h
src/include/config.h
+0
-1
No files found.
src/backend/parser/analyze.c
View file @
8edbc3bd
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.
9 1996/10/31 05:54:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.
10 1996/11/04 04:19:41
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1309,7 +1309,6 @@ make_targetlist_expr(ParseState *pstate,
...
@@ -1309,7 +1309,6 @@ make_targetlist_expr(ParseState *pstate,
if
(
attrtype
!=
type_id
)
{
if
(
attrtype
!=
type_id
)
{
if
(
IsA
(
expr
,
Const
))
{
if
(
IsA
(
expr
,
Const
))
{
/* try to cast the constant */
/* try to cast the constant */
#ifdef ARRAY_PATCH
if
(
arrayRef
&&
!
(((
A_Indices
*
)
lfirst
(
arrayRef
))
->
lidx
))
{
if
(
arrayRef
&&
!
(((
A_Indices
*
)
lfirst
(
arrayRef
))
->
lidx
))
{
/* updating a single item */
/* updating a single item */
Oid
typelem
=
get_typelem
(
attrtype
);
Oid
typelem
=
get_typelem
(
attrtype
);
...
@@ -1318,7 +1317,6 @@ make_targetlist_expr(ParseState *pstate,
...
@@ -1318,7 +1317,6 @@ make_targetlist_expr(ParseState *pstate,
get_id_type
((
long
)
typelem
),
get_id_type
((
long
)
typelem
),
attrlen
);
attrlen
);
}
else
}
else
#endif
expr
=
(
Node
*
)
parser_typecast2
(
expr
,
expr
=
(
Node
*
)
parser_typecast2
(
expr
,
type_id
,
type_id
,
get_id_type
((
long
)
attrtype
),
get_id_type
((
long
)
attrtype
),
...
@@ -1345,11 +1343,7 @@ make_targetlist_expr(ParseState *pstate,
...
@@ -1345,11 +1343,7 @@ make_targetlist_expr(ParseState *pstate,
&
pstate
->
p_last_resno
);
&
pstate
->
p_last_resno
);
while
(
ar
!=
NIL
)
{
while
(
ar
!=
NIL
)
{
A_Indices
*
ind
=
lfirst
(
ar
);
A_Indices
*
ind
=
lfirst
(
ar
);
#ifdef ARRAY_PATCH
if
(
lowerIndexpr
||
(
!
upperIndexpr
&&
ind
->
lidx
))
{
if
(
lowerIndexpr
||
(
!
upperIndexpr
&&
ind
->
lidx
))
{
#else
if
(
lowerIndexpr
)
{
#endif
/* XXX assume all lowerIndexpr is non-null in
/* XXX assume all lowerIndexpr is non-null in
* this case
* this case
*/
*/
...
...
src/backend/utils/adt/arrayfuncs.c
View file @
8edbc3bd
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.
6 1996/11/04 04:05:10
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.
7 1996/11/04 04:19:49
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -890,11 +890,7 @@ array_set(ArrayType *array,
...
@@ -890,11 +890,7 @@ array_set(ArrayType *array,
* fixed length arrays -- these are assumed to be 1-d
* fixed length arrays -- these are assumed to be 1-d
*/
*/
if
(
indx
[
0
]
*
elmlen
>
arraylen
)
if
(
indx
[
0
]
*
elmlen
>
arraylen
)
#ifdef ARRAY_PATCH
elog
(
WARN
,
"array_ref: array bound exceeded"
);
elog
(
WARN
,
"array_ref: array bound exceeded"
);
#else
elog
(
WARN
,
"array_set: array bound exceeded"
);
#endif
pos
=
(
char
*
)
array
+
indx
[
0
]
*
elmlen
;
pos
=
(
char
*
)
array
+
indx
[
0
]
*
elmlen
;
ArrayCastAndSet
(
dataPtr
,
(
bool
)
reftype
,
elmlen
,
pos
);
ArrayCastAndSet
(
dataPtr
,
(
bool
)
reftype
,
elmlen
,
pos
);
return
((
char
*
)
array
);
return
((
char
*
)
array
);
...
@@ -905,14 +901,10 @@ array_set(ArrayType *array,
...
@@ -905,14 +901,10 @@ array_set(ArrayType *array,
nbytes
=
(
*
(
int32
*
)
array
)
-
ARR_OVERHEAD
(
ndim
);
nbytes
=
(
*
(
int32
*
)
array
)
-
ARR_OVERHEAD
(
ndim
);
if
(
!
SanityCheckInput
(
ndim
,
n
,
dim
,
lb
,
indx
))
if
(
!
SanityCheckInput
(
ndim
,
n
,
dim
,
lb
,
indx
))
#ifdef ARRAY_PATCH
{
{
elog
(
WARN
,
"array_set: array bound exceeded"
);
elog
(
WARN
,
"array_set: array bound exceeded"
);
return
((
char
*
)
array
);
return
((
char
*
)
array
);
}
}
#else
return
((
char
*
)
array
);
#endif
offset
=
GetOffset
(
n
,
dim
,
lb
,
indx
);
offset
=
GetOffset
(
n
,
dim
,
lb
,
indx
);
if
(
ARR_IS_LO
(
array
))
{
if
(
ARR_IS_LO
(
array
))
{
...
@@ -948,7 +940,6 @@ array_set(ArrayType *array,
...
@@ -948,7 +940,6 @@ array_set(ArrayType *array,
if
(
nbytes
-
offset
<
1
)
return
((
char
*
)
array
);
if
(
nbytes
-
offset
<
1
)
return
((
char
*
)
array
);
pos
=
ARR_DATA_PTR
(
array
)
+
offset
;
pos
=
ARR_DATA_PTR
(
array
)
+
offset
;
}
else
{
}
else
{
#ifdef ARRAY_PATCH
ArrayType
*
newarray
;
ArrayType
*
newarray
;
char
*
elt_ptr
;
char
*
elt_ptr
;
int
oldsize
,
newsize
,
oldlen
,
newlen
,
lth0
,
lth1
,
lth2
;
int
oldsize
,
newsize
,
oldlen
,
newlen
,
lth0
,
lth1
,
lth2
;
...
@@ -980,9 +971,6 @@ array_set(ArrayType *array,
...
@@ -980,9 +971,6 @@ array_set(ArrayType *array,
/* ??? who should free this storage ??? */
/* ??? who should free this storage ??? */
return
((
char
*
)
newarray
);
return
((
char
*
)
newarray
);
#else
elog
(
WARN
,
"array_set: update of variable length fields not supported"
);
#endif
}
}
ArrayCastAndSet
(
dataPtr
,
(
bool
)
reftype
,
elmlen
,
pos
);
ArrayCastAndSet
(
dataPtr
,
(
bool
)
reftype
,
elmlen
,
pos
);
return
((
char
*
)
array
);
return
((
char
*
)
array
);
...
...
src/include/config.h
View file @
8edbc3bd
...
@@ -180,7 +180,6 @@
...
@@ -180,7 +180,6 @@
/* found in src/backend/utils/adt/arrayfuncs.c */
/* found in src/backend/utils/adt/arrayfuncs.c */
/* #define LOARRAY */
/* #define LOARRAY */
#define ARRAY_PATCH
#define NULL_PATCH
#define NULL_PATCH
#define OPENLINK_PATCHES
#define OPENLINK_PATCHES
...
...
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