mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Fix argument of pg_create_logical_replication_slot for slot name
All attributes and arguments using a slot name map to the data type "name", but this function has been using "text". This is cosmetic, as even if text is used then the slot name would be truncated to 64 characters anyway and stored as such. The documentation already said so and the function already assumed that the argument was of this type when fetching its value. Bump catalog version. Author: Sawada Masahiko Discussion: https://postgr.es/m/CAD21AoADYz_-eAqH5AVFaCaojcRgwpo9PW=u8kgTMys63oB8Cw@mail.gmail.com
This commit is contained in:
@@ -142,7 +142,7 @@ pg_create_logical_replication_slot(PG_FUNCTION_ARGS)
|
||||
/* build initial snapshot, might take a while */
|
||||
DecodingContextFindStartpoint(ctx);
|
||||
|
||||
values[0] = CStringGetTextDatum(NameStr(MyReplicationSlot->data.name));
|
||||
values[0] = NameGetDatum(&MyReplicationSlot->data.name);
|
||||
values[1] = LSNGetDatum(MyReplicationSlot->data.confirmed_flush);
|
||||
|
||||
/* don't need the decoding context anymore */
|
||||
|
Reference in New Issue
Block a user