mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Allow definition of lock mode for custom reloptions
Relation options can define a lock mode other than AccessExclusiveMode
since 47167b7
, but modules defining custom relation options did not
really have a way to enforce that. Correct that by extending the
current API set so as modules can define a custom lock mode.
Author: Michael Paquier
Reviewed-by: Kuntal Ghosh
Discussion: https://postgr.es/m/20190920013831.GD1844@paquier.xyz
This commit is contained in:
@@ -247,13 +247,16 @@ typedef struct
|
||||
|
||||
extern relopt_kind add_reloption_kind(void);
|
||||
extern void add_bool_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
bool default_val);
|
||||
bool default_val, LOCKMODE lockmode);
|
||||
extern void add_int_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
int default_val, int min_val, int max_val);
|
||||
int default_val, int min_val, int max_val,
|
||||
LOCKMODE lockmode);
|
||||
extern void add_real_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
double default_val, double min_val, double max_val);
|
||||
double default_val, double min_val, double max_val,
|
||||
LOCKMODE lockmode);
|
||||
extern void add_string_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
const char *default_val, validate_string_relopt validator);
|
||||
const char *default_val, validate_string_relopt validator,
|
||||
LOCKMODE lockmode);
|
||||
|
||||
extern Datum transformRelOptions(Datum oldOptions, List *defList,
|
||||
const char *namspace, char *validnsps[],
|
||||
|
Reference in New Issue
Block a user