1 /*------------------------------------------------------------------------- 2 * 3 * toasting.h 4 * This file provides some definitions to support creation of toast tables 5 * 6 * 7 * Portions Copyright (c) 1996-2018, 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 #include "storage/lock.h" 18 19 /* 20 * toasting.c prototypes 21 */ 22 extern void NewRelationCreateToastTable(Oid relOid, Datum reloptions); 23 extern void NewHeapCreateToastTable(Oid relOid, Datum reloptions, 24 LOCKMODE lockmode, Oid OIDOldToast); 25 extern void AlterTableCreateToastTable(Oid relOid, Datum reloptions, 26 LOCKMODE lockmode); 27 extern void BootstrapToastTable(char *relName, 28 Oid toastOid, Oid toastIndexOid); 29 30 31 /* 32 * This macro is just to keep the C compiler from spitting up on the 33 * upcoming commands for Catalog.pm. 34 */ 35 #define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable 36 37 38 /* 39 * What follows are lines processed by genbki.pl to create the statements 40 * the bootstrap parser will turn into BootstrapToastTable commands. 41 * Each line specifies the system catalog that needs a toast table, 42 * the OID to assign to the toast table, and the OID to assign to the 43 * toast table's index. The reason we hard-wire these OIDs is that we 44 * need stable OIDs for shared relations, and that includes toast tables 45 * of shared relations. 46 */ 47 48 /* normal catalogs */ 49 DECLARE_TOAST(pg_attrdef, 2830, 2831); 50 DECLARE_TOAST(pg_constraint, 2832, 2833); 51 DECLARE_TOAST(pg_description, 2834, 2835); 52 DECLARE_TOAST(pg_proc, 2836, 2837); 53 DECLARE_TOAST(pg_rewrite, 2838, 2839); 54 DECLARE_TOAST(pg_seclabel, 3598, 3599); 55 DECLARE_TOAST(pg_statistic, 2840, 2841); 56 DECLARE_TOAST(pg_statistic_ext, 3439, 3440); 57 DECLARE_TOAST(pg_trigger, 2336, 2337); 58 59 /* shared catalogs */ 60 DECLARE_TOAST(pg_shdescription, 2846, 2847); 61 #define PgShdescriptionToastTable 2846 62 #define PgShdescriptionToastIndex 2847 63 DECLARE_TOAST(pg_db_role_setting, 2966, 2967); 64 #define PgDbRoleSettingToastTable 2966 65 #define PgDbRoleSettingToastIndex 2967 66 DECLARE_TOAST(pg_shseclabel, 4060, 4061); 67 #define PgShseclabelToastTable 4060 68 #define PgShseclabelToastIndex 4061 69 70 #endif /* TOASTING_H */ 71