Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b29fa95

Browse files
committed
Add some const decorations
One of these functions is new in PostgreSQL 14; might as well start it out right.
1 parent 4dcb1d0 commit b29fa95

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/backend/replication/logical/origin.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ replorigin_check_prerequisites(bool check_slots, bool recoveryOK)
206206
* Returns InvalidOid if the node isn't known yet and missing_ok is true.
207207
*/
208208
RepOriginId
209-
replorigin_by_name(char *roname, bool missing_ok)
209+
replorigin_by_name(const char *roname, bool missing_ok)
210210
{
211211
Form_pg_replication_origin ident;
212212
Oid roident = InvalidOid;
@@ -237,7 +237,7 @@ replorigin_by_name(char *roname, bool missing_ok)
237237
* Needs to be called in a transaction.
238238
*/
239239
RepOriginId
240-
replorigin_create(char *roname)
240+
replorigin_create(const char *roname)
241241
{
242242
Oid roident;
243243
HeapTuple tuple = NULL;
@@ -411,7 +411,7 @@ replorigin_drop_guts(Relation rel, RepOriginId roident, bool nowait)
411411
* Needs to be called in a transaction.
412412
*/
413413
void
414-
replorigin_drop_by_name(char *name, bool missing_ok, bool nowait)
414+
replorigin_drop_by_name(const char *name, bool missing_ok, bool nowait)
415415
{
416416
RepOriginId roident;
417417
Relation rel;

src/include/replication/origin.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ extern PGDLLIMPORT XLogRecPtr replorigin_session_origin_lsn;
3838
extern PGDLLIMPORT TimestampTz replorigin_session_origin_timestamp;
3939

4040
/* API for querying & manipulating replication origins */
41-
extern RepOriginId replorigin_by_name(char *name, bool missing_ok);
42-
extern RepOriginId replorigin_create(char *name);
43-
extern void replorigin_drop_by_name(char *name, bool missing_ok, bool nowait);
41+
extern RepOriginId replorigin_by_name(const char *name, bool missing_ok);
42+
extern RepOriginId replorigin_create(const char *name);
43+
extern void replorigin_drop_by_name(const char *name, bool missing_ok, bool nowait);
4444
extern bool replorigin_by_oid(RepOriginId roident, bool missing_ok,
4545
char **roname);
4646

0 commit comments

Comments
 (0)