@@ -185,7 +185,7 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
185
185
else
186
186
ereport (ERROR ,
187
187
(errcode (ERRCODE_SYNTAX_ERROR ),
188
- errmsg ("unrecognized subscription parameter: %s " , defel -> defname )));
188
+ errmsg ("unrecognized subscription parameter: \"%s\" " , defel -> defname )));
189
189
}
190
190
191
191
/*
@@ -198,17 +198,21 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
198
198
if (enabled && * enabled_given && * enabled )
199
199
ereport (ERROR ,
200
200
(errcode (ERRCODE_SYNTAX_ERROR ),
201
- errmsg ("connect = false and enabled = true are mutually exclusive options" )));
201
+ /*- translator: both %s are strings of the form "option = value" */
202
+ errmsg ("%s and %s are mutually exclusive options" ,
203
+ "connect = false" , "enabled = true" )));
202
204
203
205
if (create_slot && create_slot_given && * create_slot )
204
206
ereport (ERROR ,
205
207
(errcode (ERRCODE_SYNTAX_ERROR ),
206
- errmsg ("connect = false and create_slot = true are mutually exclusive options" )));
208
+ errmsg ("%s and %s are mutually exclusive options" ,
209
+ "connect = false" , "create_slot = true" )));
207
210
208
211
if (copy_data && copy_data_given && * copy_data )
209
212
ereport (ERROR ,
210
213
(errcode (ERRCODE_SYNTAX_ERROR ),
211
- errmsg ("connect = false and copy_data = true are mutually exclusive options" )));
214
+ errmsg ("%s and %s are mutually exclusive options" ,
215
+ "connect = false" , "copy_data = true" )));
212
216
213
217
/* Change the defaults of other options. */
214
218
* enabled = false;
@@ -225,22 +229,28 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
225
229
if (enabled && * enabled_given && * enabled )
226
230
ereport (ERROR ,
227
231
(errcode (ERRCODE_SYNTAX_ERROR ),
228
- errmsg ("slot_name = NONE and enabled = true are mutually exclusive options" )));
232
+ /*- translator: both %s are strings of the form "option = value" */
233
+ errmsg ("%s and %s are mutually exclusive options" ,
234
+ "slot_name = NONE" , "enable = true" )));
229
235
230
236
if (create_slot && create_slot_given && * create_slot )
231
237
ereport (ERROR ,
232
238
(errcode (ERRCODE_SYNTAX_ERROR ),
233
- errmsg ("slot_name = NONE and create_slot = true are mutually exclusive options" )));
239
+ errmsg ("%s and %s are mutually exclusive options" ,
240
+ "slot_name = NONE" , "create_slot = true" )));
234
241
235
242
if (enabled && !* enabled_given && * enabled )
236
243
ereport (ERROR ,
237
244
(errcode (ERRCODE_SYNTAX_ERROR ),
238
- errmsg ("subscription with slot_name = NONE must also set enabled = false" )));
245
+ /*- translator: both %s are strings of the form "option = value" */
246
+ errmsg ("subscription with %s must also set %s" ,
247
+ "slot_name = NONE" , "enabled = false" )));
239
248
240
249
if (create_slot && !create_slot_given && * create_slot )
241
250
ereport (ERROR ,
242
251
(errcode (ERRCODE_SYNTAX_ERROR ),
243
- errmsg ("subscription with slot_name = NONE must also set create_slot = false" )));
252
+ errmsg ("subscription with %s must also set %s" ,
253
+ "slot_name = NONE" , "create_slot = false" )));
244
254
}
245
255
}
246
256
@@ -487,9 +497,9 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel)
487
497
}
488
498
else
489
499
ereport (WARNING ,
490
- ( errmsg ( "tables were not subscribed, you will have to run "
491
- "ALTER SUBSCRIPTION ... REFRESH PUBLICATION to "
492
- "subscribe the tables " )));
500
+ /* translator: %s is an SQL ALTER statement */
501
+ ( errmsg ( "tables were not subscribed, you will have to run %s to subscribe the tables" ,
502
+ "ALTER SUBSCRIPTION ... REFRESH PUBLICATION " )));
493
503
494
504
table_close (rel , RowExclusiveLock );
495
505
@@ -673,7 +683,8 @@ AlterSubscription(AlterSubscriptionStmt *stmt)
673
683
if (sub -> enabled && !slotname )
674
684
ereport (ERROR ,
675
685
(errcode (ERRCODE_SYNTAX_ERROR ),
676
- errmsg ("cannot set slot_name = NONE for enabled subscription" )));
686
+ errmsg ("cannot set %s for enabled subscription" ,
687
+ "slot_name = NONE" )));
677
688
678
689
if (slotname )
679
690
values [Anum_pg_subscription_subslotname - 1 ] =
@@ -981,8 +992,9 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
981
992
(errmsg ("could not connect to publisher when attempting to "
982
993
"drop the replication slot \"%s\"" , slotname ),
983
994
errdetail ("The error was: %s" , err ),
984
- errhint ("Use ALTER SUBSCRIPTION ... SET (slot_name = NONE) "
985
- "to disassociate the subscription from the slot." )));
995
+ /* translator: %s is an SQL ALTER command */
996
+ errhint ("Use %s to disassociate the subscription from the slot." ,
997
+ "ALTER SUBSCRIPTION ... SET (slot_name = NONE)" )));
986
998
987
999
PG_TRY ();
988
1000
{
0 commit comments