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

Commit869920c

Browse files
committed
Replace $1 notation in queries to %s as psycopg2 expects it
1 parent7594a7e commit869920c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎testgres/node.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def source_walsender(self):
210210
sql="""
211211
select pid
212212
from pg_catalog.pg_stat_replication
213-
where application_name =$1
213+
where application_name =%s
214214
"""
215215

216216
ifnotself.master:
@@ -322,7 +322,7 @@ def _create_recovery_conf(self, username, slot=None):
322322
res=con.execute("""
323323
select exists (
324324
select from pg_catalog.pg_replication_slots
325-
where slot_name =$1
325+
where slot_name =%s
326326
)
327327
""",slot)
328328

@@ -332,7 +332,7 @@ def _create_recovery_conf(self, username, slot=None):
332332

333333
# TODO: we should drop this slot after replica's cleanup()
334334
con.execute("""
335-
select pg_catalog.pg_create_physical_replication_slot($1)
335+
select pg_catalog.pg_create_physical_replication_slot(%s)
336336
""",slot)
337337

338338
line+="primary_slot_name={}\n".format(slot)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp