postgresql/src/include/catalog/pg_conversion.h

97 lines
2.9 KiB
C
Raw Normal View History

/*-------------------------------------------------------------------------
*
* pg_conversion.h
* definition of the system "conversion" relation (pg_conversion)
* along with the relation's initial contents.
*
*
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/catalog/pg_conversion.h,v 1.20 2008/01/01 19:45:56 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
* information from the DATA() statements.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_CONVERSION_H
#define PG_CONVERSION_H
/* ----------------
* postgres.h contains the system type definitions and the
* CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
* can be read by both genbki.sh and the C compiler.
* ----------------
*/
/* ----------------------------------------------------------------
* pg_conversion definition.
*
* cpp turns this into typedef struct FormData_pg_namespace
*
* conname name of the conversion
* connamespace name space which the conversion belongs to
2002-08-04 08:54:10 +02:00
* conowner owner of the conversion
* conforencoding FOR encoding id
* contoencoding TO encoding id
2002-09-04 22:31:48 +02:00
* conproc OID of the conversion proc
2003-09-16 09:47:06 +02:00
* condefault TRUE if this is a default conversion
* ----------------------------------------------------------------
*/
#define ConversionRelationId 2607
CATALOG(pg_conversion,2607)
{
NameData conname;
Oid connamespace;
Oid conowner;
int4 conforencoding;
int4 contoencoding;
regproc conproc;
bool condefault;
} FormData_pg_conversion;
/* ----------------
* Form_pg_conversion corresponds to a pointer to a tuple with
* the format of pg_conversion relation.
* ----------------
*/
typedef FormData_pg_conversion *Form_pg_conversion;
/* ----------------
* compiler constants for pg_conversion
* ----------------
*/
#define Natts_pg_conversion 7
#define Anum_pg_conversion_conname 1
2002-09-04 22:31:48 +02:00
#define Anum_pg_conversion_connamespace 2
#define Anum_pg_conversion_conowner 3
#define Anum_pg_conversion_conforencoding 4
#define Anum_pg_conversion_contoencoding 5
#define Anum_pg_conversion_conproc 6
#define Anum_pg_conversion_condefault 7
/* ----------------
* initial contents of pg_conversion
* ---------------
*/
/*
* prototypes for functions in pg_conversion.c
*/
#include "nodes/parsenodes.h"
2002-09-04 22:31:48 +02:00
extern Oid ConversionCreate(const char *conname, Oid connamespace,
Oid conowner,
int32 conforencoding, int32 contoencoding,
2002-09-04 22:31:48 +02:00
Oid conproc, bool def);
extern void ConversionDrop(Oid conversionOid, DropBehavior behavior);
extern void RemoveConversionById(Oid conversionOid);
2002-09-04 22:31:48 +02:00
extern Oid FindConversion(const char *conname, Oid connamespace);
extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding);
2002-08-06 07:40:47 +02:00
#endif /* PG_CONVERSION_H */