Documentation says - subscription_parameters must be enumerated through 'comma' symbol:
https://www.postgresql.org/docs/current/sql-createsubscription.html
CREATE SUBSCRIPTION subscription_name
CONNECTION 'conninfo'
PUBLICATION publication_name [, ...]
[ WITH ( subscription_parameter [= value] [, ... ] ) ]
Subscription class does it with 'space' symbol:
| query= ( |
| "create subscription {} connection '{}' publication {}").format( |
| name, options_string(**conninfo), self.pub.name) |
| |
| # additional parameters |
| ifparams: |
| query+=" with ({})".format(options_string(**params)) |
See options_string function:
| defoptions_string(separator=u" ", **kwargs): |
| returnseparator.join(u"{}={}".format(k, v) fork, viniteritems(kwargs)) |
Plan
- Create the tests
- Fix a problem
Documentation says - subscription_parameters must be enumerated through 'comma' symbol:
https://www.postgresql.org/docs/current/sql-createsubscription.html
Subscription class does it with 'space' symbol:
testgres/testgres/pubsub.py
Lines 136 to 142 in bab1d8e
See options_string function:
testgres/testgres/utils.py
Lines 265 to 266 in bab1d8e
Plan