pg_language.h 2.3 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * pg_language.h
4 5
 *	  definition of the system "language" relation (pg_language)
 *	  along with the relation's initial contents.
6 7
 *
 *
P
 
PostgreSQL Daemon 已提交
8
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
B
Add:  
Bruce Momjian 已提交
9
 * Portions Copyright (c) 1994, Regents of the University of California
10
 *
11
 * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.26 2005/04/14 01:38:20 tgl Exp $
12 13
 *
 * NOTES
14 15
 *	  the genbki.sh script reads this file and generates .bki
 *	  information from the DATA() statements.
16 17 18 19 20 21 22
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_LANGUAGE_H
#define PG_LANGUAGE_H

/* ----------------
23
 *		postgres.h contains the system type definitions and the
24
 *		CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
25
 *		can be read by both genbki.sh and the C compiler.
26 27 28 29
 * ----------------
 */

/* ----------------
30 31
 *		pg_language definition.  cpp turns this into
 *		typedef struct FormData_pg_language
32
 * ----------------
33
 */
34 35 36
#define LanguageRelationId  2612

CATALOG(pg_language,2612)
37
{
38
	NameData	lanname;
39 40 41
	bool		lanispl;		/* Is a procedural language */
	bool		lanpltrusted;	/* PL is trusted */
	Oid			lanplcallfoid;	/* Call handler for PL */
42
	Oid			lanvalidator;	/* optional validation function */
B
Bruce Momjian 已提交
43
	aclitem		lanacl[1];		/* Access privileges */
44 45 46
} FormData_pg_language;

/* ----------------
47 48
 *		Form_pg_language corresponds to a pointer to a tuple with
 *		the format of pg_language relation.
49 50
 * ----------------
 */
51
typedef FormData_pg_language *Form_pg_language;
52 53

/* ----------------
54
 *		compiler constants for pg_language
55 56
 * ----------------
 */
57
#define Natts_pg_language				6
58
#define Anum_pg_language_lanname		1
59 60 61
#define Anum_pg_language_lanispl		2
#define Anum_pg_language_lanpltrusted		3
#define Anum_pg_language_lanplcallfoid		4
62
#define Anum_pg_language_lanvalidator		5
63
#define Anum_pg_language_lanacl			6
64 65

/* ----------------
66
 *		initial contents of pg_language
67 68 69
 * ----------------
 */

70
DATA(insert OID = 12 ( "internal" f f 0 2246 _null_ ));
71 72
DESCR("Built-in functions");
#define INTERNALlanguageId 12
73
DATA(insert OID = 13 ( "c" f f 0 2247 _null_ ));
74
DESCR("Dynamically-loaded C functions");
75
#define ClanguageId 13
76
DATA(insert OID = 14 ( "sql" f t 0 2248 _null_ ));
77
DESCR("SQL-language functions");
78 79
#define SQLlanguageId 14

80
#endif   /* PG_LANGUAGE_H */