aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-06-06 00:41:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-06-06 00:41:28 +0000
commitc541bb86e9ec8fed37b23df6a0df703d0bde4dfa (patch)
treeb4cff96eecc86e338274ec5d7355918efe9c149e /src/backend/tcop/postgres.c
parentc3a153afed84e29dac664bdc6123724a9e3a906f (diff)
downloadpostgresql-c541bb86e9ec8fed37b23df6a0df703d0bde4dfa.tar.gz
postgresql-c541bb86e9ec8fed37b23df6a0df703d0bde4dfa.zip
Infrastructure for I/O of composite types: arrange for the I/O routines
of a composite type to get that type's OID as their second parameter, in place of typelem which is useless. The actual changes are mostly centralized in getTypeInputInfo and siblings, but I had to fix a few places that were fetching pg_type.typelem for themselves instead of using the lsyscache.c routines. Also, I renamed all the related variables from 'typelem' to 'typioparam' to discourage people from assuming that they necessarily contain array element types.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 29d457e94e1..07b60969a45 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.418 2004/06/03 02:08:03 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.419 2004/06/06 00:41:27 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -1432,11 +1432,11 @@ exec_bind_message(StringInfo input_message)
if (pformat == 0)
{
- Oid typInput;
- Oid typElem;
+ Oid typinput;
+ Oid typioparam;
char *pstring;
- getTypeInputInfo(ptype, &typInput, &typElem);
+ getTypeInputInfo(ptype, &typinput, &typioparam);
/*
* We have to do encoding conversion before
@@ -1446,9 +1446,9 @@ exec_bind_message(StringInfo input_message)
pg_client_to_server((unsigned char *) pbuf.data,
plength);
params[i].value =
- OidFunctionCall3(typInput,
+ OidFunctionCall3(typinput,
CStringGetDatum(pstring),
- ObjectIdGetDatum(typElem),
+ ObjectIdGetDatum(typioparam),
Int32GetDatum(-1));
/* Free result of encoding conversion, if any */
if (pstring != pbuf.data)
@@ -1456,19 +1456,19 @@ exec_bind_message(StringInfo input_message)
}
else if (pformat == 1)
{
- Oid typReceive;
- Oid typElem;
+ Oid typreceive;
+ Oid typioparam;
/*
* Call the parameter type's binary input
* converter
*/
- getTypeBinaryInputInfo(ptype, &typReceive, &typElem);
+ getTypeBinaryInputInfo(ptype, &typreceive, &typioparam);
params[i].value =
- OidFunctionCall2(typReceive,
+ OidFunctionCall2(typreceive,
PointerGetDatum(&pbuf),
- ObjectIdGetDatum(typElem));
+ ObjectIdGetDatum(typioparam));
/* Trouble if it didn't eat the whole buffer */
if (pbuf.cursor != pbuf.len)