aboutsummaryrefslogtreecommitdiff
path: root/src/man/catalogs.3
blob: b306c2b66dc570fafea14ca5110dde516c566929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/catalogs.3,v 1.2 1996/12/11 00:27:04 momjian Exp $
.TH "SYSTEM CATALOGS" INTRO 03/13/94 PostgreSQL PostgreSQL
.SH "Section 7 \(em System Catalogs"
.de LS
.PP
.if n .ta 5 +13 +13
.if t .ta 0.5i +1.3i +1.3i
.in 0
.nf
..
.de LE
.fi
.in
..
.SH "DESCRIPTION"
In this
section we list each of the attributes of the system catalogs and
define their meanings.
.SH "CLASS/TYPE SYSTEM CATALOGS"
These catalogs form the core of the extensibility system:
.LS
	\fBname\fP	\fBshared/local\fP	\fBdescription\fP
	pg_aggregate	local	aggregate functions
	pg_am	local	access methods
	pg_amop	local	operators usable with specific access methods
	pg_amproc	local	procedures used with specific access methods
	pg_attribute	local	class attributes
	pg_class	local	classes
	pg_index	local	secondary indices
	pg_inherits	local	class inheritance hierarchy
	pg_language	local	procedure implementation languages
	pg_opclass	local	operator classes
	pg_operator	local	query language operators
	pg_proc	local	procedures (functions)
	pg_type	local	data types
.LE
.SH "ENTITIES"
These catalogs deal with identification of entities known throughout
the site:
.LS
	\fBname\fP	\fBshared/local\fP	\fBdescription\fP
	pg_database	shared	current databases
	pg_group	shared	user groups
	pg_user	shared	valid users
.LE
.SH "RULE SYSTEM CATALOGS"
.LS
	\fBname\fP	\fBshared/local\fP	\fBdescription\fP
	pg_listener	local	processes waiting on alerters
	pg_prs2plans	local	instance system procedures
	pg_prs2rule	local	instance system rules
	pg_prs2stub	local	instance system ``stubs''
	pg_rewrite	local	rewrite system information
.LE
.SH "LARGE OBJECT CATALOGS"
.PP
These catalogs are specific to the Inversion file system and large
objects in general:
.LS
	\fBname\fP	\fBshared/local\fP	\fBdescription\fP
	pg_lobj	local	description of a large object
	pg_naming	local	Inversion name space mapping
	pg_platter	local	jukebox platter inventory
	pg_plmap	local	jukebox platter extent map
.LE
.SH "INTERNAL CATALOGS"
.PP
These catalogs are internal classes that are not stored as normal
heaps and cannot be accessed through normal means (attempting to do so
causes an error).
.LS
	\fBname\fP	\fBshared/local\fP	\fBdescription\fP
	pg_log	shared	transaction commit/abort log
	pg_magic	shared	magic constant
	pg_time	shared	commit/abort times
	pg_variable	shared	special variable values
.LE
.PP
There are several other classes defined with \*(lqpg_\*(rq names.
Aside from those that end in \*(lqind\*(rq (secondary indices), these
are all obsolete or otherwise deprecated.
.SH "CLASS/TYPE SYSTEM CATALOGS"
.PP
The following catalogs relate to the class/type system.
.nf M
/*
 * aggregates
 *
 * see DEFINE AGGREGATE for an explanation of transition functions
 */
pg_aggregate
    NameData      aggname	/* aggregate name (e.g., "count") */
    oid         aggowner	/* usesysid of creator */
    regproc     aggtransfn1	/* first transition function */
    regproc     aggtransfn2	/* second transition function */
    regproc     aggfinalfn	/* final function */
    oid         aggbasetype	/* type of data on which aggregate
				   operates */
    oid         aggtranstype1	/* type returned by aggtransfn1 */
    oid         aggtranstype2	/* type returned by aggtransfn2 */
    oid         aggfinaltype	/* type returned by aggfinalfn */
    text        agginitval1	/* external format of initial
				   (starting) value of aggtransfn1 */
    text        agginitval2	/* external format of initial
				   (starting) value of aggtransfn2 */
.fi
.nf M
pg_am
    NameData      amname		/* access method name */
    oid         amowner	/* usesysid of creator */
    char        amkind		/* - deprecated */
				/* originally:
				   h=hashed
				   o=ordered
				   s=special */
    int2        amstrategies	/* total NUMBER of strategies by which
				   we can traverse/search this AM */
    int2        amsupport	/* total NUMBER of support functions
				   that this AM uses */
    regproc     amgettuple	/* "next valid tuple" function */
    regproc     aminsert	/* "insert this tuple" function */
    regproc     amdelete	/* "delete this tuple" function */
    regproc     amgetattr	/* - deprecated */
    regproc     amsetlock	/* - deprecated */
    regproc     amsettid	/* - deprecated */
    regproc     amfreetuple	/* - deprecated */
    regproc     ambeginscan	/* "start new scan" function */
    regproc     amrescan	/* "restart this scan" function */
    regproc     amendscan	/* "end this scan" function */
    regproc     ammarkpos	/* "mark current scan position"
				   function */
    regproc     amrestrpos	/* "restore marked scan position"
				   function */
    regproc     amopen		/* - deprecated */
    regproc     amclose	/* - deprecated */
    regproc     ambuild	/* "build new index" function */
    regproc     amcreate 	/* - deprecated */
    regproc     amdestroy	/* - deprecated */
.fi
.nf M
pg_amop
    oid         amopid		/* access method with which this 
				   operator be used */
    oid         amopclaid	/* operator class with which this
				   operator can be used */
    oid         amopopr	/* the operator */
    int2        amopstrategy	/* traversal/search strategy number
				   to which this operator applies */
    regproc     amopselect	/* function to calculate the operator
				   selectivity */
    regproc     amopnpages	/* function to calculate the number of
				   pages that will be examined */
.fi
.nf M
pg_amproc
    oid         amid		/* access method with which this
				   procedure is associated */
    oid         amopclaid	/* operator class with which this
				   operator can be used */
    oid         amproc		/* the procedure */
    int2        amprocnum	/* support function number to which
				   this operator applies */
.fi
.nf M
pg_class
     NameData     relname	/* class name */
     oid        relowner	/* usesysid of owner */
     oid        relam	/* access method */
     int4       relpages	/* # of 8KB pages */
     int4       reltuples	/* # of instances */
     abstime    relexpires	/* time after which instances are
				   deleted from non-archival storage */
     reltime    relpreserved	/* timespan after which instances are
				   deleted from non-archival storage */
     bool       relhasindex	/* does the class have a secondary
				   index? */
     bool       relisshared	/* is the class shared or local? */
     char       relkind		/* type of relation:
				   i=index
				   r=relation (heap)
				   s=special
				   u=uncatalogued (temporary) */
     char       relarch	/* archive mode:
			   h=heavy
			   l=light
			   n=none */
     int2       relnatts	/* current # of non-system
				   attributes */
     int2       relsmgr	/* storage manager:
			   0=magnetic disk
			   1=sony WORM jukebox
			   2=main memory */
     int28      relkey	/* - unused */
     oid8       relkeyop	/* - unused */
     aclitem    relacl[1]	/* access control lists */
.fi
.nf M
pg_attribute
    oid         attrelid	/* class containing this attribute */
    NameData      attname	/* attribute name */
    oid         atttypid	/* attribute type */
    oid         attdefrel	/* - deprecated */
    int4        attnvals	/* - deprecated */
    oid         atttyparg	/* - deprecated */
    int2        attlen	/* attribute length, in bytes
			   -1=variable */
    int2        attnum	/* attribute number
			   >0=user attribute
			   <0=system attribute */
    int2        attbound	/* - deprecated */
    bool        attbyval	/* type passed by value? */
    bool        attcanindex	/* - deprecated */
    oid         attproc	/* - deprecated */
    int4        attnelems	/* # of array dimensions */
    int4        attcacheoff	/* cached offset into tuple */
    bool        attisset	/* is attribute set-valued? */
.fi
.nf M
pg_inherits
    oid         inhrel	/* child class */
    oid         inhparent	/* parent class */
    int4        inhseqno	/* - deprecated */
.fi
.nf M
    oid         indexrelid	/* oid of secondary index class */
    oid         indrelid	/* oid of indexed heap class */
    oid         indproc	/* function to compute index key from
				   attribute(s) in heap
				   0=not a functional index */
    int28       indkey	/* attribute numbers of key 
			   attribute(s) */
    oid8        indclass	/* opclass of each key */
    bool        indisclustered	/* is the index clustered?
				   - unused */
    bool        indisarchived	/* is the index archival?
				   - unused */
    text        indpred	/* query plan for partial index 
			   predicate */
.fi
.nf M
pg_type
    NameData      typname	/* type name */
    oid         typowner	/* usesysid of owner */
    int2        typlen	/* length in internal form
			   -1=variable-length */
    int2        typprtlen	/* length in external form */
    bool        typbyval	/* type passed by value? */
    char        typtype	/* kind of type:
			   c=catalog (composite)
			   b=base */
    bool        typisdefined	/* defined or still a shell? */
    char        typdelim	/* delimiter for array external form */
    oid         typrelid	/* class (if composite) */
    oid         typelem	/* type of each array element */
    regproc     typinput	/* external-internal conversion
				   function */ 
    regproc     typoutput	/* internal-external conversion
				   function */
    regproc     typreceive	/* client-server conversion function */
    regproc     typsend	/* server-client conversion function */
    text        typdefault	/* default value */
.fi
.nf M
pg_operator
    NameData      oprname	/* operator name */
    oid         oprowner	/* usesysid of owner */
    int2        oprprec	/* - deprecated */
    char        oprkind	/* kind of operator:
			   b=binary
			   l=left unary
			   r=right unary */
    bool        oprisleft	/* is operator left/right associative? */
    bool        oprcanhash	/* is operator usable for hashjoin? */
    oid         oprleft	/* left operand type */
    oid         oprright	/* right operand type */
    oid         oprresult	/* result type */
    oid         oprcom	/* commutator operator */
    oid         oprnegate	/* negator operator */
    oid         oprlsortop	/* sort operator for left operand */
    oid         oprrsortop	/* sort operator for right operand */
    regproc     oprcode	/* function implementing this operator */
    regproc     oprrest	/* function to calculate operator
			   restriction selectivity */
    regproc     oprjoin	/* function to calculate operator 
			   join selectivity */
.fi
.nf M
pg_opclass
    NameData      opcname	/* operator class name */
.fi
.nf M
pg_proc
    NameData      proname	/* function name */
    oid         proowner	/* usesysid of owner */
    oid         prolang	/* function implementation language */
    bool        proisinh	/* - deprecated */
    bool        proistrusted	/* run in server or untrusted function
				   process? */
    bool        proiscachable	/* can the function return values be
				   cached? */
    int2        pronargs	/* # of arguments */
    bool        proretset	/* does the function return a set?
				   - unused */
    oid         prorettype	/* return type */
    oid8        proargtypes	/* argument types */
    int4        probyte_pct	/* % of argument size (in bytes) that
				   needs to be examined in order to
				   compute the function */ 
    int4        properbyte_cpu	/* sensitivity of the function's
				   running time to the size of its
				   inputs */
    int4        propercall_cpu	/* overhead of the function's
				   invocation (regardless of input
				   size) */
    int4        prooutin_ratio	/* size of the function's output as a
				   percentage of the size of the input */
    text        prosrc	/* function definition (postquel only) */
    bytea       probin	/* path to object file (C only) */
.fi
.nf M
pg_language
    NameData      lanname	/* language name */
    text        lancompiler	/* - deprecated */
.fi
.SH "ENTITIES"
.nf M
pg_database
    NameData      datname		/* database name */
    oid         datdba		/* usesysid of database administrator */
    text        datpath		/* directory of database under
				   $PGDATA */ 
.fi
.nf M
pg_group
    NameData      groname	/* group name */
    int2        grosysid	/* group's UNIX group id */
    int2        grolist[1]	/* list of usesysids of group members */
.fi
.nf M
pg_user
    NameData      usename		/* user's name */
    int2        usesysid	/* user's UNIX user id */
    bool        usecreatedb	/* can user create databases? */
    bool        usetrace	/* can user set trace flags? */
    bool        usesuper	/* can user be POSTGRES superuser? */
    bool        usecatupd	/* can user update catalogs? */
.fi
.SH "RULE SYSTEM CATALOGS"
.nf M
pg_listener
    NameData      relname	/* class for which asynchronous 
			   notification is desired */
    int4        listenerpid	/* process id of server corresponding
				   to a frontend program waiting for
				   asynchronous notification */
    int4        notification	/* whether an event notification for
				   this process id still pending */

.fi
.nf M
pg_prs2rule
    NameData      prs2name	/* rule name */
    char        prs2eventtype	/* rule event type:
				   R=retrieve
				   U=update (replace)
				   A=append
				   D=delete */
    oid         prs2eventrel	/* class to which event applies */
    int2        prs2eventattr	/* attribute to which event applies */
    float8      necessary	/* - deprecated */
    float8      sufficient	/* - deprecated */
    text        prs2text	/* text of original rule definition */
.fi
.nf M
pg_prs2plans
    oid         prs2ruleid	/* prs2rule instance for which this
				   plan is used */
    int2        prs2planno	/* plan number (one rule may invoke
				   multiple plans) */
    text        prs2code	/* external representation of the plan */
.fi
.nf M
pg_prs2stub
    oid         prs2relid	/* class to which this rule applies */
    bool        prs2islast	/* is this the last stub fragment? */
    int4        prs2no		/* stub fragment number */
    stub        prs2stub	/* stub fragment */
.fi
.nf M
pg_rewrite
    NameData      rulename	/* rule name */
    char        ev_type	/* event type:
			   RETRIEVE, REPLACE, APPEND, DELETE
			   codes are parser-dependent (!?) */
    oid         ev_class	/* class to which this rule applies */
    int2        ev_attr	/* attribute to which this rule applies */
    bool        is_instead	/* is this an "instead" rule? */
    text        ev_qual	/* qualification with which to modify
			   (rewrite) the plan that triggered this
			   rule */
    text        action	/* parse tree of action */
.fi
.SH "LARGE OBJECT CATALOGS"
.nf M
pg_lobj
    oid         ourid		/* 'ourid' from pg_naming that
				   identifies this object in the
				   Inversion file system namespace */
    int4        objtype		/* storage type code:
				   0=Inversion
				   1=Unix
				   2=External
				   3=Jaquith */
    bytea       object_descripto/* opaque object-handle structure */
.fi
.nf M
pg_naming
    NameData      filename	/* filename component */
    oid         ourid		/* random oid used to identify this
				   instance in other instances (can't
				   use the actual oid for obscure
				   reasons */
    oid         parentid	/* pg_naming instance of parent
				   Inversion file system directory */
.fi
.nf M
pg_platter
     NameData     plname		/* platter name */
     int4       plstart		/* the highest OCCUPIED extent */
.fi
.nf M
pg_plmap
     oid        plid		/* platter (in pg_platter) on which
				   this extent (of blocks) resides */
     oid        pldbid		/* database of the class to which this
				   extent (of blocks) belongs */
     oid        plrelid		/* class to which this extend (of
				   blocks) belongs */
     int4       plblkno		/* starting block number within the
				   class */ 
     int4       ploffset	/* offset within the platter at which
				   this extent begins */
     int4       plextentsz	/* length of this extent */
.fi