1 /*-------------------------------------------------------------------------
4 * definition of the system "authorization identifier" relation (pg_authid)
5 * along with the relation's initial contents.
7 * pg_shadow and pg_group are now publicly accessible views on pg_authid.
10 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
11 * Portions Copyright (c) 1994, Regents of the University of California
16 * the genbki.sh script reads this file and generates .bki
17 * information from the DATA() statements.
19 *-------------------------------------------------------------------------
24 #include "catalog/genbki.h"
27 * The CATALOG definition has to refer to the type of rolvaliduntil as
28 * "timestamptz" (lower case) so that bootstrap mode recognizes it. But
29 * the C header files define this type as TimestampTz. Since the field is
30 * potentially-null and therefore can't be accessed directly from C code,
31 * there is no particular need for the C struct definition to show the
32 * field type as TimestampTz --- instead we just make it int.
34 #define timestamptz int
38 * pg_authid definition. cpp turns this into
39 * typedef struct FormData_pg_authid
42 #define AuthIdRelationId 1260
44 CATALOG(pg_authid
,1260) BKI_SHARED_RELATION
46 NameData rolname
; /* name of role */
47 bool rolsuper
; /* read this field via superuser() only! */
48 bool rolinherit
; /* inherit privileges from other roles? */
49 bool rolcreaterole
; /* allowed to create more roles? */
50 bool rolcreatedb
; /* allowed to create databases? */
51 bool rolcatupdate
; /* allowed to alter catalogs manually? */
52 bool rolcanlogin
; /* allowed to log in as session user? */
53 int4 rolconnlimit
; /* max connections allowed (-1=no limit) */
55 /* remaining fields may be null; use heap_getattr to read them! */
56 text rolpassword
; /* password, if any */
57 timestamptz rolvaliduntil
; /* password expiration time, if any */
58 text rolconfig
[1]; /* GUC settings to apply at login */
65 * Form_pg_authid corresponds to a pointer to a tuple with
66 * the format of pg_authid relation.
69 typedef FormData_pg_authid
*Form_pg_authid
;
72 * compiler constants for pg_authid
75 #define Natts_pg_authid 11
76 #define Anum_pg_authid_rolname 1
77 #define Anum_pg_authid_rolsuper 2
78 #define Anum_pg_authid_rolinherit 3
79 #define Anum_pg_authid_rolcreaterole 4
80 #define Anum_pg_authid_rolcreatedb 5
81 #define Anum_pg_authid_rolcatupdate 6
82 #define Anum_pg_authid_rolcanlogin 7
83 #define Anum_pg_authid_rolconnlimit 8
84 #define Anum_pg_authid_rolpassword 9
85 #define Anum_pg_authid_rolvaliduntil 10
86 #define Anum_pg_authid_rolconfig 11
89 * initial contents of pg_authid
91 * The uppercase quantities will be replaced at initdb time with
95 DATA(insert OID
= 10 ( "POSTGRES" t t t t t t
-1 _null_ _null_ _null_
));
97 #define BOOTSTRAP_SUPERUSERID 10
99 #endif /* PG_AUTHID_H */