]> granicus.if.org Git - postgresql/blob - src/include/catalog/toasting.h
Stamp copyrights for year 2011.
[postgresql] / src / include / catalog / toasting.h
1 /*-------------------------------------------------------------------------
2  *
3  * toasting.h
4  *        This file provides some definitions to support creation of toast tables
5  *
6  *
7  * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/toasting.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef TOASTING_H
15 #define TOASTING_H
16
17 /*
18  * toasting.c prototypes
19  */
20 extern void AlterTableCreateToastTable(Oid relOid, Datum reloptions);
21 extern void BootstrapToastTable(char *relName,
22                                         Oid toastOid, Oid toastIndexOid);
23
24
25 /*
26  * This macro is just to keep the C compiler from spitting up on the
27  * upcoming commands for genbki.pl.
28  */
29 #define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable
30
31
32 /*
33  * What follows are lines processed by genbki.pl to create the statements
34  * the bootstrap parser will turn into BootstrapToastTable commands.
35  * Each line specifies the system catalog that needs a toast table,
36  * the OID to assign to the toast table, and the OID to assign to the
37  * toast table's index.  The reason we hard-wire these OIDs is that we
38  * need stable OIDs for shared relations, and that includes toast tables
39  * of shared relations.
40  */
41
42 /* normal catalogs */
43 DECLARE_TOAST(pg_attrdef, 2830, 2831);
44 DECLARE_TOAST(pg_constraint, 2832, 2833);
45 DECLARE_TOAST(pg_description, 2834, 2835);
46 DECLARE_TOAST(pg_proc, 2836, 2837);
47 DECLARE_TOAST(pg_rewrite, 2838, 2839);
48 DECLARE_TOAST(pg_seclabel, 3598, 3599);
49 DECLARE_TOAST(pg_statistic, 2840, 2841);
50 DECLARE_TOAST(pg_trigger, 2336, 2337);
51
52 /* shared catalogs */
53 DECLARE_TOAST(pg_database, 2844, 2845);
54 #define PgDatabaseToastTable 2844
55 #define PgDatabaseToastIndex 2845
56 DECLARE_TOAST(pg_shdescription, 2846, 2847);
57 #define PgShdescriptionToastTable 2846
58 #define PgShdescriptionToastIndex 2847
59 DECLARE_TOAST(pg_db_role_setting, 2966, 2967);
60 #define PgDbRoleSettingToastTable 2966
61 #define PgDbRoleSettingToastIndex 2967
62
63 #endif   /* TOASTING_H */