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
9356877b
Commit
9356877b
authored
Mar 02, 2006
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Repair oidvectorrecv and int2vectorrecv, which I broke while changing
them to use array_recv :-(. Per report from Tim Kordas.
parent
487b7f5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
src/backend/utils/adt/int.c
src/backend/utils/adt/int.c
+21
-6
src/backend/utils/adt/oid.c
src/backend/utils/adt/oid.c
+21
-6
No files found.
src/backend/utils/adt/int.c
View file @
9356877b
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/int.c,v 1.
69 2005/11/17 22:14:53
tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/int.c,v 1.
70 2006/03/02 21:13:04
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -212,13 +212,28 @@ Datum
int2vectorrecv
(
PG_FUNCTION_ARGS
)
{
StringInfo
buf
=
(
StringInfo
)
PG_GETARG_POINTER
(
0
);
FunctionCallInfoData
locfcinfo
;
int2vector
*
result
;
result
=
(
int2vector
*
)
DatumGetPointer
(
DirectFunctionCall3
(
array_recv
,
PointerGetDatum
(
buf
),
ObjectIdGetDatum
(
INT2OID
),
Int32GetDatum
(
-
1
)));
/*
* Normally one would call array_recv() using DirectFunctionCall3,
* but that does not work since array_recv wants to cache some data
* using fcinfo->flinfo->fn_extra. So we need to pass it our own
* flinfo parameter.
*/
InitFunctionCallInfoData
(
locfcinfo
,
fcinfo
->
flinfo
,
3
,
NULL
,
NULL
);
locfcinfo
.
arg
[
0
]
=
PointerGetDatum
(
buf
);
locfcinfo
.
arg
[
1
]
=
ObjectIdGetDatum
(
INT2OID
);
locfcinfo
.
arg
[
2
]
=
Int32GetDatum
(
-
1
);
locfcinfo
.
argnull
[
0
]
=
false
;
locfcinfo
.
argnull
[
1
]
=
false
;
locfcinfo
.
argnull
[
2
]
=
false
;
result
=
(
int2vector
*
)
DatumGetPointer
(
array_recv
(
&
locfcinfo
));
Assert
(
!
locfcinfo
.
isnull
);
/* sanity checks: int2vector must be 1-D, no nulls */
if
(
ARR_NDIM
(
result
)
!=
1
||
ARR_HASNULL
(
result
)
||
...
...
src/backend/utils/adt/oid.c
View file @
9356877b
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/oid.c,v 1.6
6 2005/11/22 18:17:23 momjian
Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/oid.c,v 1.6
7 2006/03/02 21:13:04 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -254,13 +254,28 @@ Datum
oidvectorrecv
(
PG_FUNCTION_ARGS
)
{
StringInfo
buf
=
(
StringInfo
)
PG_GETARG_POINTER
(
0
);
FunctionCallInfoData
locfcinfo
;
oidvector
*
result
;
result
=
(
oidvector
*
)
DatumGetPointer
(
DirectFunctionCall3
(
array_recv
,
PointerGetDatum
(
buf
),
ObjectIdGetDatum
(
OIDOID
),
Int32GetDatum
(
-
1
)));
/*
* Normally one would call array_recv() using DirectFunctionCall3,
* but that does not work since array_recv wants to cache some data
* using fcinfo->flinfo->fn_extra. So we need to pass it our own
* flinfo parameter.
*/
InitFunctionCallInfoData
(
locfcinfo
,
fcinfo
->
flinfo
,
3
,
NULL
,
NULL
);
locfcinfo
.
arg
[
0
]
=
PointerGetDatum
(
buf
);
locfcinfo
.
arg
[
1
]
=
ObjectIdGetDatum
(
OIDOID
);
locfcinfo
.
arg
[
2
]
=
Int32GetDatum
(
-
1
);
locfcinfo
.
argnull
[
0
]
=
false
;
locfcinfo
.
argnull
[
1
]
=
false
;
locfcinfo
.
argnull
[
2
]
=
false
;
result
=
(
oidvector
*
)
DatumGetPointer
(
array_recv
(
&
locfcinfo
));
Assert
(
!
locfcinfo
.
isnull
);
/* sanity checks: oidvector must be 1-D, no nulls */
if
(
ARR_NDIM
(
result
)
!=
1
||
ARR_HASNULL
(
result
)
||
...
...
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