Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8edbc3b

Browse files
committed
Remove ARRAY_PATCH define
1 parente43dfad commit8edbc3b

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

‎src/backend/parser/analyze.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.9 1996/10/31 05:54:25 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.10 1996/11/04 04:19:41 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1309,7 +1309,6 @@ make_targetlist_expr(ParseState *pstate,
13091309
if (attrtype!=type_id) {
13101310
if (IsA(expr,Const)) {
13111311
/* try to cast the constant */
1312-
#ifdefARRAY_PATCH
13131312
if (arrayRef&& !(((A_Indices*)lfirst(arrayRef))->lidx)) {
13141313
/* updating a single item */
13151314
Oidtypelem=get_typelem(attrtype);
@@ -1318,7 +1317,6 @@ make_targetlist_expr(ParseState *pstate,
13181317
get_id_type((long)typelem),
13191318
attrlen);
13201319
}else
1321-
#endif
13221320
expr= (Node*)parser_typecast2(expr,
13231321
type_id,
13241322
get_id_type((long)attrtype),
@@ -1345,11 +1343,7 @@ make_targetlist_expr(ParseState *pstate,
13451343
&pstate->p_last_resno);
13461344
while(ar!=NIL) {
13471345
A_Indices*ind=lfirst(ar);
1348-
#ifdefARRAY_PATCH
13491346
if (lowerIndexpr|| (!upperIndexpr&&ind->lidx)) {
1350-
#else
1351-
if (lowerIndexpr) {
1352-
#endif
13531347
/* XXX assume all lowerIndexpr is non-null in
13541348
* this case
13551349
*/

‎src/backend/utils/adt/arrayfuncs.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.6 1996/11/04 04:05:10 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.7 1996/11/04 04:19:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -890,11 +890,7 @@ array_set(ArrayType *array,
890890
* fixed length arrays -- these are assumed to be 1-d
891891
*/
892892
if (indx[0]*elmlen>arraylen)
893-
#ifdefARRAY_PATCH
894893
elog(WARN,"array_ref: array bound exceeded");
895-
#else
896-
elog(WARN,"array_set: array bound exceeded");
897-
#endif
898894
pos= (char*)array+indx[0]*elmlen;
899895
ArrayCastAndSet(dataPtr, (bool)reftype,elmlen,pos);
900896
return((char*)array);
@@ -905,14 +901,10 @@ array_set(ArrayType *array,
905901
nbytes= (* (int32*)array)-ARR_OVERHEAD(ndim);
906902

907903
if (!SanityCheckInput(ndim,n,dim,lb,indx))
908-
#ifdefARRAY_PATCH
909904
{
910905
elog(WARN,"array_set: array bound exceeded");
911906
return((char*)array);
912907
}
913-
#else
914-
return((char*)array);
915-
#endif
916908
offset=GetOffset(n,dim,lb,indx);
917909

918910
if (ARR_IS_LO(array)) {
@@ -948,7 +940,6 @@ array_set(ArrayType *array,
948940
if (nbytes-offset<1)return((char*)array);
949941
pos=ARR_DATA_PTR (array)+offset;
950942
}else {
951-
#ifdefARRAY_PATCH
952943
ArrayType*newarray;
953944
char*elt_ptr;
954945
intoldsize,newsize,oldlen,newlen,lth0,lth1,lth2;
@@ -980,9 +971,6 @@ array_set(ArrayType *array,
980971

981972
/* ??? who should free this storage ??? */
982973
return((char*)newarray);
983-
#else
984-
elog(WARN,"array_set: update of variable length fields not supported");
985-
#endif
986974
}
987975
ArrayCastAndSet(dataPtr, (bool)reftype,elmlen,pos);
988976
return((char*)array);

‎src/include/config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@
180180

181181
/* found in src/backend/utils/adt/arrayfuncs.c */
182182
/* #define LOARRAY */
183-
#defineARRAY_PATCH
184183
#defineNULL_PATCH
185184
#defineOPENLINK_PATCHES
186185

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp