pg_language.h 2.4 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
 *
 *
8
 * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
B
Add:  
Bruce Momjian 已提交
9
 * Portions Copyright (c) 1994, Regents of the University of California
10
 *
11
 * src/include/catalog/pg_language.h
12 13
 *
 * NOTES
14
 *	  the genbki.pl script reads this file and generates .bki
15
 *	  information from the DATA() statements.
16 17 18 19 20 21
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_LANGUAGE_H
#define PG_LANGUAGE_H

22
#include "catalog/genbki.h"
23 24

/* ----------------
25 26
 *		pg_language definition.  cpp turns this into
 *		typedef struct FormData_pg_language
27
 * ----------------
28
 */
B
Bruce Momjian 已提交
29
#define LanguageRelationId	2612
30 31

CATALOG(pg_language,2612)
32
{
33 34
	NameData	lanname;		/* Language name */
	Oid			lanowner;		/* Language's owner */
35 36 37
	bool		lanispl;		/* Is a procedural language */
	bool		lanpltrusted;	/* PL is trusted */
	Oid			lanplcallfoid;	/* Call handler for PL */
38
	Oid			laninline;		/* Optional anonymous-block handler function */
39
	Oid			lanvalidator;	/* Optional validation function */
40
#ifdef CATALOG_VARLEN			/* variable-length fields start here */
B
Bruce Momjian 已提交
41
	aclitem		lanacl[1];		/* Access privileges */
42
#endif
43 44 45
} FormData_pg_language;

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

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

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

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

81
#endif   /* PG_LANGUAGE_H */