diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-12 21:49:47 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-12 21:49:47 +0000 |
commit | 59c016aa9f490b533621ab26a98de02cf0ab7e31 (patch) | |
tree | 815313c5297ba61a23efcaf8f811794933992d72 /src/backend/utils/cache | |
parent | bb2ffe9acf6d6aedeae06041bbd70f8ffbcb3f2a (diff) | |
download | postgresql-59c016aa9f490b533621ab26a98de02cf0ab7e31.tar.gz postgresql-59c016aa9f490b533621ab26a98de02cf0ab7e31.zip |
Pass the type OID as the typioparam for all non-array types, rather than
only composite types as we did in 8.0. Per discussion with Martijn
van Oosterhout.
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r-- | src/backend/utils/cache/lsyscache.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index ea10f8c8cd3..6b1646b896d 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/lsyscache.c,v 1.126 2005/06/28 05:09:01 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/lsyscache.c,v 1.127 2005/08/12 21:49:47 tgl Exp $ * * NOTES * Eventually, the index information should go through here, too. @@ -1223,13 +1223,14 @@ getTypeIOParam(HeapTuple typeTuple) Form_pg_type typeStruct = (Form_pg_type) GETSTRUCT(typeTuple); /* - * Composite types get their own OID as parameter; array types get - * their typelem as parameter; everybody else gets zero. + * Array types get their typelem as parameter; everybody else gets + * their own type OID as parameter. (This is a change from 8.0, + * in which only composite types got their own OID as parameter.) */ - if (typeStruct->typtype == 'c') - return HeapTupleGetOid(typeTuple); - else + if (OidIsValid(typeStruct->typelem)) return typeStruct->typelem; + else + return HeapTupleGetOid(typeTuple); } /* |