@@ -185,7 +185,7 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
185185 else
186186 ereport (ERROR ,
187187 (errcode (ERRCODE_SYNTAX_ERROR ),
188- errmsg ("unrecognized subscription parameter: %s " , defel -> defname )));
188+ errmsg ("unrecognized subscription parameter: \"%s\" " , defel -> defname )));
189189 }
190190
191191 /*
@@ -198,17 +198,21 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
198198 if (enabled && * enabled_given && * enabled )
199199 ereport (ERROR ,
200200 (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" )));
202204
203205 if (create_slot && create_slot_given && * create_slot )
204206 ereport (ERROR ,
205207 (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" )));
207210
208211 if (copy_data && copy_data_given && * copy_data )
209212 ereport (ERROR ,
210213 (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" )));
212216
213217 /* Change the defaults of other options. */
214218 * enabled = false;
@@ -225,22 +229,28 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
225229 if (enabled && * enabled_given && * enabled )
226230 ereport (ERROR ,
227231 (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" )));
229235
230236 if (create_slot && create_slot_given && * create_slot )
231237 ereport (ERROR ,
232238 (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" )));
234241
235242 if (enabled && !* enabled_given && * enabled )
236243 ereport (ERROR ,
237244 (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" )));
239248
240249 if (create_slot && !create_slot_given && * create_slot )
241250 ereport (ERROR ,
242251 (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" )));
244254 }
245255}
246256
@@ -487,9 +497,9 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel)
487497 }
488498 else
489499 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 " )));
493503
494504 table_close (rel , RowExclusiveLock );
495505
@@ -673,7 +683,8 @@ AlterSubscription(AlterSubscriptionStmt *stmt)
673683 if (sub -> enabled && !slotname )
674684 ereport (ERROR ,
675685 (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" )));
677688
678689 if (slotname )
679690 values [Anum_pg_subscription_subslotname - 1 ] =
@@ -981,8 +992,9 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
981992 (errmsg ("could not connect to publisher when attempting to "
982993 "drop the replication slot \"%s\"" , slotname ),
983994 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)" )));
986998
987999 PG_TRY ();
9881000 {
0 commit comments