1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* lsyscache.h
|
1999-08-09 05:13:31 +02:00
|
|
|
* Convenience routines for common queries in the system catalog cache.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2001-05-07 02:43:27 +02:00
|
|
|
* $Id: lsyscache.h,v 1.31 2001/05/07 00:43:26 tgl Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef LSYSCACHE_H
|
|
|
|
#define LSYSCACHE_H
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/htup.h"
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2000-08-13 04:50:35 +02:00
|
|
|
extern bool op_class(Oid opno, Oid opclass, Oid amopid);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern char *get_attname(Oid relid, AttrNumber attnum);
|
1996-08-28 03:59:28 +02:00
|
|
|
extern AttrNumber get_attnum(Oid relid, char *attname);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern Oid get_atttype(Oid relid, AttrNumber attnum);
|
|
|
|
extern bool get_attisset(Oid relid, char *attname);
|
1998-07-12 23:29:40 +02:00
|
|
|
extern int32 get_atttypmod(Oid relid, AttrNumber attnum);
|
2000-08-13 04:50:35 +02:00
|
|
|
extern RegProcedure get_opcode(Oid opno);
|
|
|
|
extern char *get_opname(Oid opno);
|
|
|
|
extern bool op_mergejoinable(Oid opno, Oid ltype, Oid rtype,
|
1997-09-08 23:56:23 +02:00
|
|
|
Oid *leftOp, Oid *rightOp);
|
2000-08-13 04:50:35 +02:00
|
|
|
extern Oid op_hashjoinable(Oid opno, Oid ltype, Oid rtype);
|
|
|
|
extern bool op_iscachable(Oid opno);
|
|
|
|
extern Oid get_commutator(Oid opno);
|
|
|
|
extern Oid get_negator(Oid opno);
|
|
|
|
extern RegProcedure get_oprrest(Oid opno);
|
|
|
|
extern RegProcedure get_oprjoin(Oid opno);
|
1999-08-16 04:06:25 +02:00
|
|
|
extern Oid get_func_rettype(Oid funcid);
|
2000-08-13 04:50:35 +02:00
|
|
|
extern bool func_iscachable(Oid funcid);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern char *get_rel_name(Oid relid);
|
|
|
|
extern int16 get_typlen(Oid typid);
|
|
|
|
extern bool get_typbyval(Oid typid);
|
2000-11-16 23:30:52 +01:00
|
|
|
extern void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval);
|
2000-11-20 21:36:57 +01:00
|
|
|
extern char get_typstorage(Oid typid);
|
1999-08-09 05:13:31 +02:00
|
|
|
extern Datum get_typdefault(Oid typid);
|
2001-05-07 02:43:27 +02:00
|
|
|
extern bool get_attstatsslot(HeapTuple statstuple,
|
|
|
|
Oid atttype, int32 atttypmod,
|
|
|
|
int reqkind, Oid reqop,
|
|
|
|
Datum **values, int *nvalues,
|
|
|
|
float4 **numbers, int *nnumbers);
|
|
|
|
extern void free_attstatsslot(Oid atttype,
|
|
|
|
Datum *values, int nvalues,
|
|
|
|
float4 *numbers, int nnumbers);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2001-03-22 05:01:46 +01:00
|
|
|
#define TypeIsToastable(typid) (get_typstorage(typid) != 'p')
|
2000-11-20 21:36:57 +01:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* LSYSCACHE_H */
|