]> granicus.if.org Git - postgresql/blobdiff - src/include/utils/lsyscache.h
Create the planner mechanism for optimizing simple MIN and MAX queries
[postgresql] / src / include / utils / lsyscache.h
index 550a14efe73cc7a3e8a6f57e08395c359b15eb0b..b98b53c60fc618d4c4c02e8fbd53c6f94d693c4c 100644 (file)
@@ -3,10 +3,10 @@
  * lsyscache.h
  *       Convenience routines for common queries in the system catalog cache.
  *
- * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: lsyscache.h,v 1.78 2003/08/04 02:40:15 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.97 2005/04/11 23:06:56 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,13 +22,18 @@ typedef enum IOFuncSelector
        IOFunc_output,
        IOFunc_receive,
        IOFunc_send
-}      IOFuncSelector;
+} IOFuncSelector;
 
 extern bool op_in_opclass(Oid opno, Oid opclass);
-extern bool op_requires_recheck(Oid opno, Oid opclass);
-extern Oid     get_opclass_member(Oid opclass, int16 strategy);
+extern int     get_op_opclass_strategy(Oid opno, Oid opclass);
+extern void get_op_opclass_properties(Oid opno, Oid opclass,
+                                                 int *strategy, Oid *subtype,
+                                                 bool *recheck);
+extern Oid     get_opclass_member(Oid opclass, Oid subtype, int16 strategy);
 extern Oid     get_op_hash_function(Oid opno);
+extern Oid     get_opclass_proc(Oid opclass, Oid subtype, int16 procnum);
 extern char *get_attname(Oid relid, AttrNumber attnum);
+extern char *get_relid_attribute_name(Oid relid, AttrNumber attnum);
 extern AttrNumber get_attnum(Oid relid, const char *attname);
 extern Oid     get_atttype(Oid relid, AttrNumber attnum);
 extern int32 get_atttypmod(Oid relid, AttrNumber attnum);
@@ -38,6 +43,7 @@ extern bool opclass_is_btree(Oid opclass);
 extern bool opclass_is_hash(Oid opclass);
 extern RegProcedure get_opcode(Oid opno);
 extern char *get_opname(Oid opno);
+extern void op_input_types(Oid opno, Oid *lefttype, Oid *righttype);
 extern bool op_mergejoinable(Oid opno, Oid *leftOp, Oid *rightOp);
 extern void op_mergejoin_crossops(Oid opno, Oid *ltop, Oid *gtop,
                                          RegProcedure *ltproc, RegProcedure *gtproc);
@@ -50,7 +56,8 @@ extern RegProcedure get_oprrest(Oid opno);
 extern RegProcedure get_oprjoin(Oid opno);
 extern char *get_func_name(Oid funcid);
 extern Oid     get_func_rettype(Oid funcid);
-extern Oid     get_func_signature(Oid funcid, Oid *argtypes, int *nargs);
+extern int     get_func_nargs(Oid funcid);
+extern Oid     get_func_signature(Oid funcid, Oid **argtypes, int *nargs);
 extern bool get_func_retset(Oid funcid);
 extern bool func_strict(Oid funcid);
 extern char func_volatile(Oid funcid);
@@ -66,13 +73,14 @@ extern bool get_typbyval(Oid typid);
 extern void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval);
 extern void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval,
                                         char *typalign);
+extern Oid     getTypeIOParam(HeapTuple typeTuple);
 extern void get_type_io_data(Oid typid,
                                 IOFuncSelector which_func,
                                 int16 *typlen,
                                 bool *typbyval,
                                 char *typalign,
                                 char *typdelim,
-                                Oid *typelem,
+                                Oid *typioparam,
                                 Oid *func);
 extern char get_typstorage(Oid typid);
 extern int32 get_typtypmod(Oid typid);
@@ -81,12 +89,11 @@ extern char get_typtype(Oid typid);
 extern Oid     get_typ_typrelid(Oid typid);
 extern Oid     get_element_type(Oid typid);
 extern Oid     get_array_type(Oid typid);
-extern char *get_typname(Oid relid);
-extern void getTypeInputInfo(Oid type, Oid *typInput, Oid *typElem);
-extern void getTypeOutputInfo(Oid type, Oid *typOutput, Oid *typElem,
+extern void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam);
+extern void getTypeOutputInfo(Oid type, Oid *typOutput, Oid *typIOParam,
                                  bool *typIsVarlena);
-extern void getTypeBinaryInputInfo(Oid type, Oid *typReceive, Oid *typElem);
-extern void getTypeBinaryOutputInfo(Oid type, Oid *typSend, Oid *typElem,
+extern void getTypeBinaryInputInfo(Oid type, Oid *typReceive, Oid *typIOParam);
+extern void getTypeBinaryOutputInfo(Oid type, Oid *typSend, Oid *typIOParam,
                                                bool *typIsVarlena);
 extern Oid     getBaseType(Oid typid);
 extern int32 get_typavgwidth(Oid typid, int32 typmod);
@@ -100,7 +107,8 @@ extern void free_attstatsslot(Oid atttype,
                                  Datum *values, int nvalues,
                                  float4 *numbers, int nnumbers);
 extern char *get_namespace_name(Oid nspid);
-extern int32 get_usesysid(const char *username);
+extern AclId get_usesysid(const char *username);
+extern AclId get_grosysid(char *groname);
 
 #define is_array_type(typid)  (get_element_type(typid) != InvalidOid)