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
 *
P
 
PostgreSQL Daemon 已提交
11
 * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.25 2004/12/31 22:03:24 pgsql 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 25
 *		CATALOG(), BOOTSTRAP and DATA() sugar words so this file
 *		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
 */
CATALOG(pg_language)
{
36
	NameData	lanname;
37 38 39
	bool		lanispl;		/* Is a procedural language */
	bool		lanpltrusted;	/* PL is trusted */
	Oid			lanplcallfoid;	/* Call handler for PL */
40
	Oid			lanvalidator;	/* optional validation function */
B
Bruce Momjian 已提交
41
	aclitem		lanacl[1];		/* Access privileges */
42 43 44
} FormData_pg_language;

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

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

/* ----------------
64
 *		initial contents of pg_language
65 66 67
 * ----------------
 */

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

78
#endif   /* PG_LANGUAGE_H */