mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add some const decorations to prototypes
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
This commit is contained in:
@ -582,7 +582,7 @@ add_reloption(relopt_gen *newoption)
|
||||
* (for types other than string)
|
||||
*/
|
||||
static relopt_gen *
|
||||
allocate_reloption(bits32 kinds, int type, char *name, char *desc)
|
||||
allocate_reloption(bits32 kinds, int type, const char *name, const char *desc)
|
||||
{
|
||||
MemoryContext oldcxt;
|
||||
size_t size;
|
||||
@ -630,7 +630,7 @@ allocate_reloption(bits32 kinds, int type, char *name, char *desc)
|
||||
* Add a new boolean reloption
|
||||
*/
|
||||
void
|
||||
add_bool_reloption(bits32 kinds, char *name, char *desc, bool default_val)
|
||||
add_bool_reloption(bits32 kinds, const char *name, const char *desc, bool default_val)
|
||||
{
|
||||
relopt_bool *newoption;
|
||||
|
||||
@ -646,7 +646,7 @@ add_bool_reloption(bits32 kinds, char *name, char *desc, bool default_val)
|
||||
* Add a new integer reloption
|
||||
*/
|
||||
void
|
||||
add_int_reloption(bits32 kinds, char *name, char *desc, int default_val,
|
||||
add_int_reloption(bits32 kinds, const char *name, const char *desc, int default_val,
|
||||
int min_val, int max_val)
|
||||
{
|
||||
relopt_int *newoption;
|
||||
@ -665,7 +665,7 @@ add_int_reloption(bits32 kinds, char *name, char *desc, int default_val,
|
||||
* Add a new float reloption
|
||||
*/
|
||||
void
|
||||
add_real_reloption(bits32 kinds, char *name, char *desc, double default_val,
|
||||
add_real_reloption(bits32 kinds, const char *name, const char *desc, double default_val,
|
||||
double min_val, double max_val)
|
||||
{
|
||||
relopt_real *newoption;
|
||||
@ -689,7 +689,7 @@ add_real_reloption(bits32 kinds, char *name, char *desc, double default_val,
|
||||
* the validation.
|
||||
*/
|
||||
void
|
||||
add_string_reloption(bits32 kinds, char *name, char *desc, char *default_val,
|
||||
add_string_reloption(bits32 kinds, const char *name, const char *desc, const char *default_val,
|
||||
validate_string_relopt validator)
|
||||
{
|
||||
relopt_string *newoption;
|
||||
@ -742,7 +742,7 @@ add_string_reloption(bits32 kinds, char *name, char *desc, char *default_val,
|
||||
* but we declare them as Datums to avoid including array.h in reloptions.h.
|
||||
*/
|
||||
Datum
|
||||
transformRelOptions(Datum oldOptions, List *defList, char *namspace,
|
||||
transformRelOptions(Datum oldOptions, List *defList, const char *namspace,
|
||||
char *validnsps[], bool ignoreOids, bool isReset)
|
||||
{
|
||||
Datum result;
|
||||
|
@ -238,7 +238,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||
* and "auto" values.
|
||||
*/
|
||||
void
|
||||
gistValidateBufferingOption(char *value)
|
||||
gistValidateBufferingOption(const char *value)
|
||||
{
|
||||
if (value == NULL ||
|
||||
(strcmp(value, "on") != 0 &&
|
||||
|
@ -3478,7 +3478,7 @@ BeginTransactionBlock(void)
|
||||
* resource owner, etc while executing inside a Portal.
|
||||
*/
|
||||
bool
|
||||
PrepareTransactionBlock(char *gid)
|
||||
PrepareTransactionBlock(const char *gid)
|
||||
{
|
||||
TransactionState s;
|
||||
bool result;
|
||||
@ -3823,7 +3823,7 @@ EndImplicitTransactionBlock(void)
|
||||
* This executes a SAVEPOINT command.
|
||||
*/
|
||||
void
|
||||
DefineSavepoint(char *name)
|
||||
DefineSavepoint(const char *name)
|
||||
{
|
||||
TransactionState s = CurrentTransactionState;
|
||||
|
||||
@ -4168,7 +4168,7 @@ RollbackToSavepoint(List *options)
|
||||
* the caller to do it.
|
||||
*/
|
||||
void
|
||||
BeginInternalSubTransaction(char *name)
|
||||
BeginInternalSubTransaction(const char *name)
|
||||
{
|
||||
TransactionState s = CurrentTransactionState;
|
||||
|
||||
|
@ -327,7 +327,7 @@ not_available:
|
||||
* This is currently used for recovery_end_command and archive_cleanup_command.
|
||||
*/
|
||||
void
|
||||
ExecuteRecoveryCommand(char *command, char *commandName, bool failOnSignal)
|
||||
ExecuteRecoveryCommand(const char *command, const char *commandName, bool failOnSignal)
|
||||
{
|
||||
char xlogRecoveryCmd[MAXPGPATH];
|
||||
char lastRestartPointFname[MAXPGPATH];
|
||||
@ -425,7 +425,7 @@ ExecuteRecoveryCommand(char *command, char *commandName, bool failOnSignal)
|
||||
* in pg_wal (xlogfname), replacing any existing file with the same name.
|
||||
*/
|
||||
void
|
||||
KeepFileRestoredFromArchive(char *path, char *xlogfname)
|
||||
KeepFileRestoredFromArchive(const char *path, const char *xlogfname)
|
||||
{
|
||||
char xlogfpath[MAXPGPATH];
|
||||
bool reload = false;
|
||||
|
Reference in New Issue
Block a user