Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce89ad0

Browse files
committed
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, aseven if text is used then the slot name would be truncated to 64characters anyway and stored as such. The documentation already saidso and the function already assumed that the argument was of this typewhen fetching its value.Bump catalog version.Author: Sawada MasahikoDiscussion:https://postgr.es/m/CAD21AoADYz_-eAqH5AVFaCaojcRgwpo9PW=u8kgTMys63oB8Cw@mail.gmail.com
1 parent5fc1008 commitce89ad0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

‎src/backend/catalog/system_views.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ AS 'pg_create_physical_replication_slot';
10811081
CREATE OR REPLACEFUNCTIONpg_create_logical_replication_slot(
10821082
IN slot_name name,IN plugin name,
10831083
IN temporaryboolean DEFAULT false,
1084-
OUT slot_nametext, OUT lsn pg_lsn)
1084+
OUT slot_namename, OUT lsn pg_lsn)
10851085
RETURNS RECORD
10861086
LANGUAGE INTERNAL
10871087
STRICT VOLATILE

‎src/backend/replication/slotfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pg_create_logical_replication_slot(PG_FUNCTION_ARGS)
142142
/* build initial snapshot, might take a while */
143143
DecodingContextFindStartpoint(ctx);
144144

145-
values[0]=CStringGetTextDatum(NameStr(MyReplicationSlot->data.name));
145+
values[0]=NameGetDatum(&MyReplicationSlot->data.name);
146146
values[1]=LSNGetDatum(MyReplicationSlot->data.confirmed_flush);
147147

148148
/* don't need the decoding context anymore */

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201807111
56+
#defineCATALOG_VERSION_NO201807121
5757

5858
#endif

‎src/include/catalog/pg_proc.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9803,7 +9803,7 @@
98039803
{ oid => '3786', descr => 'set up a logical replication slot',
98049804
proname => 'pg_create_logical_replication_slot', provolatile => 'v',
98059805
proparallel => 'u', prorettype => 'record', proargtypes => 'name name bool',
9806-
proallargtypes => '{name,name,bool,text,pg_lsn}',
9806+
proallargtypes => '{name,name,bool,name,pg_lsn}',
98079807
proargmodes => '{i,i,i,o,o}',
98089808
proargnames => '{slot_name,plugin,temporary,slot_name,lsn}',
98099809
prosrc => 'pg_create_logical_replication_slot' },

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp