forked from citusdata/pg_shard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepair_shards.h
30 lines (22 loc) · 847 Bytes
/
repair_shards.h
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
/*-------------------------------------------------------------------------
*
* repair_shards.h
*
* Declarations for public functions and types to implement shard repair
* functionality.
*
* Copyright (c) 2014, Citus Data, Inc.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_SHARD_REPAIR_SHARDS_H
#define PG_SHARD_REPAIR_SHARDS_H
#include "postgres.h"
#include "fmgr.h"
/* templates for SQL commands used during shard placement repair */
#define DROP_REGULAR_TABLE_COMMAND "DROP TABLE IF EXISTS %s"
#define DROP_FOREIGN_TABLE_COMMAND "DROP FOREIGN TABLE IF EXISTS %s"
/* function declarations for shard repair functionality */
extern Datum master_copy_shard_placement(PG_FUNCTION_ARGS);
extern Datum worker_copy_shard_placement(PG_FUNCTION_ARGS);
#endif /* PG_SHARD_REPAIR_SHARDS_H */