From fb22b3209536974a44d8978f1ba2d3bdffd14c1c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 20 Oct 2004 16:04:50 +0000 Subject: Allow functions returning void or cstring to appear in FROM clause, to make life cushy for the JDBC driver. Centralize the decision-making that affects this by inventing a get_type_func_class() function, rather than adding special cases in half a dozen places. --- src/include/utils/lsyscache.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 496d2bcf11..3a016b7a52 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.90 2004/08/29 05:06:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.91 2004/10/20 16:04:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,6 +24,15 @@ typedef enum IOFuncSelector IOFunc_send } IOFuncSelector; +/* Type categories for get_type_func_class */ +typedef enum TypeFuncClass +{ + TYPEFUNC_SCALAR, + TYPEFUNC_COMPOSITE, + TYPEFUNC_RECORD, + TYPEFUNC_OTHER +} TypeFuncClass; + extern bool op_in_opclass(Oid opno, Oid opclass); extern void get_op_opclass_properties(Oid opno, Oid opclass, int *strategy, Oid *subtype, @@ -85,6 +94,7 @@ extern char get_typstorage(Oid typid); extern int32 get_typtypmod(Oid typid); extern Node *get_typdefault(Oid typid); extern char get_typtype(Oid typid); +extern TypeFuncClass get_type_func_class(Oid typid); extern Oid get_typ_typrelid(Oid typid); extern Oid get_element_type(Oid typid); extern Oid get_array_type(Oid typid); -- cgit v1.2.3