aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-22 00:01:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-22 00:01:51 +0000
commitb663f3443ba096a06970214c3e83e79f6e570b84 (patch)
tree049e26c1b02535c12bee6e60ba89cf1d42a41a72 /src/backend/access
parent606c9b9d4fafe9300d039c044edc9727c0ed43c9 (diff)
downloadpostgresql-b663f3443ba096a06970214c3e83e79f6e570b84.tar.gz
postgresql-b663f3443ba096a06970214c3e83e79f6e570b84.zip
Add a bunch of pseudo-types to replace the behavior formerly associated
with OPAQUE, as per recent pghackers discussion. I still want to do some more work on the 'cstring' pseudo-type, but I'm going to commit the bulk of the changes now before the tree starts shifting under me ...
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/common/printtup.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c
index a8a8f0da2f1..6fbce87be7c 100644
--- a/src/backend/access/common/printtup.c
+++ b/src/backend/access/common/printtup.c
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.62 2002/06/20 20:29:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.63 2002/08/22 00:01:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,10 +17,10 @@
#include "access/heapam.h"
#include "access/printtup.h"
-#include "catalog/pg_type.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
-#include "utils/syscache.h"
+#include "utils/lsyscache.h"
+
static void printtup_setup(DestReceiver *self, int operation,
const char *portalName, TupleDesc typeinfo);
@@ -34,31 +34,6 @@ static void printtup_cleanup(DestReceiver *self);
*/
/* ----------------
- * getTypeOutputInfo -- get info needed for printing values of a type
- * ----------------
- */
-bool
-getTypeOutputInfo(Oid type, Oid *typOutput, Oid *typElem,
- bool *typIsVarlena)
-{
- HeapTuple typeTuple;
- Form_pg_type pt;
-
- typeTuple = SearchSysCache(TYPEOID,
- ObjectIdGetDatum(type),
- 0, 0, 0);
- if (!HeapTupleIsValid(typeTuple))
- elog(ERROR, "getTypeOutputInfo: Cache lookup of type %u failed", type);
- pt = (Form_pg_type) GETSTRUCT(typeTuple);
-
- *typOutput = pt->typoutput;
- *typElem = pt->typelem;
- *typIsVarlena = (!pt->typbyval) && (pt->typlen == -1);
- ReleaseSysCache(typeTuple);
- return OidIsValid(*typOutput);
-}
-
-/* ----------------
* Private state for a printtup destination object
* ----------------
*/