Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
cluster.h52 linesDownload Raw Back to commands
1/*-------------------------------------------------------------------------2 *3 * cluster.h4 *	  header file for postgres cluster command stuff5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994-5, Regents of the University of California8 *9 * src/include/commands/cluster.h10 *11 *-------------------------------------------------------------------------12 */13#ifndef CLUSTER_H14#define CLUSTER_H15 16#include "nodes/parsenodes.h"17#include "parser/parse_node.h"18#include "storage/lock.h"19#include "utils/relcache.h"20 21 22/* flag bits for ClusterParams->options */23#define CLUOPT_VERBOSE 0x01		/* print progress info */24#define CLUOPT_RECHECK 0x02		/* recheck relation state */25#define CLUOPT_RECHECK_ISCLUSTERED 0x04 /* recheck relation state for26										 * indisclustered */27 28/* options for CLUSTER */29typedef struct ClusterParams30{31	bits32		options;		/* bitmask of CLUOPT_* */32} ClusterParams;33 34extern void cluster(ParseState *pstate, ClusterStmt *stmt, bool isTopLevel);35extern void cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params);36extern void check_index_is_clusterable(Relation OldHeap, Oid indexOid,37									   LOCKMODE lockmode);38extern void mark_index_clustered(Relation rel, Oid indexOid, bool is_internal);39 40extern Oid	make_new_heap(Oid OIDOldHeap, Oid NewTableSpace, Oid NewAccessMethod,41						  char relpersistence, LOCKMODE lockmode);42extern void finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,43							 bool is_system_catalog,44							 bool swap_toast_by_content,45							 bool check_constraints,46							 bool is_internal,47							 TransactionId frozenXid,48							 MultiXactId cutoffMulti,49							 char newrelpersistence);50 51#endif							/* CLUSTER_H */52 
codekingpro/portable-devtools · Team Ai