./src/backend/catalog/Makefile:42: pg_foreign_table.h pg_partition_key.h \
2) 建表 -- 以pg_partition_key為例:
2.1)在include的 catalog目錄下添加這張表的定義
#ifndef PG_PARTITION_KEY_H
#define PG_PARTITION_KEY_H
#include 'catalog/genbki.h'
#define PartitionKeyRelationId 3180
CATALOG(pg_partition_key,3180) BKI_WITHOUT_OIDS
{
Oid pkrelid;
int16 pkattnum;
} FormData_pg_partition_key;
typedef FormData_pg_partition_key *Form_pg_partition_key;
#define Natts_pg_partition_key ? 2
#define Anum_pg_partition_key_pkrelid ? 1
#define Anum_pg_partition_key_pkattnum 2
#endif
2.2) 在catalog 的indexing.h 頭文件中添加系統表的唯壹性索引
DECLARE_UNIQUE_INDEX(pg_partition_key_relid_index, 3181, on pg_partition_key using btree(pkrelid oid_ops));
#define PartitionKeyRelidIndexId 3181 r>3) Syscache -- 以 pg_partion_key為例:
3.1)首先要在syscache.h中添加 SysCacheIdentifier
3.2) 要在syscache.c 的 cacheinfo[] 中添加這張表
cache的定義:
struct cachedesc
{