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

Fix typos#152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
demonolock merged 1 commit intopostgrespro:masterfromkianmeng:fix-typos
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,12 +59,12 @@ with testgres.get_new_node() as node:
# ... node stops and its files are about to be removed
```

There are four API methods forrunnig queries:
There are four API methods forrunning queries:

| Command | Description |
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `node.psql(query, ...)` | Runs query via `psql` command and returns tuple `(error code, stdout, stderr)`. |
| `node.safe_psql(query, ...)` | Same as `psql()` except that it returns only `stdout`. If an erroroccures during the execution, an exception will be thrown. |
| `node.safe_psql(query, ...)` | Same as `psql()` except that it returns only `stdout`. If an erroroccurs during the execution, an exception will be thrown. |
| `node.execute(query, ...)` | Connects to PostgreSQL using `psycopg2` or `pg8000` (depends on which one is installed in your system) and returns two-dimensional array with data. |
| `node.connect(dbname, ...)` | Returns connection wrapper (`NodeConnection`) capable of running several queries within a single transaction. |

Expand Down
4 changes: 2 additions & 2 deletionstestgres/node.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1143,7 +1143,7 @@ def restore(self, filename, dbname=None, username=None):
filename
] # yapf: disable

# try pg_restore if dump is binaryformate, and psql if not
# try pg_restore if dump is binaryformat, and psql if not
try:
execute_utility(_params, self.utils_log_name)
except ExecUtilException:
Expand DownExpand Up@@ -1286,7 +1286,7 @@ def set_synchronous_standbys(self, standbys):

Args:
standbys: either :class:`.First` or :class:`.Any` object specifying
sychronization parameters or just a plain list of
synchronization parameters or just a plain list of
:class:`.PostgresNode`s replicas which would be equivalent
to passing ``First(1, <list>)``. For PostgreSQL 9.5 and below
it is only possible to specify a plain list of standbys as
Expand Down
2 changes: 1 addition & 1 deletiontestgres/plugins/pg_probackup2/pg_probackup2/gdb.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,7 @@ def __init__(self, cmd, env, attach=False):
" to run GDB tests")
raise GdbException("No gdb usage possible.")

# Check gdbpresense
# Check gdbpresence
try:
gdb_version, _ = subprocess.Popen(
['gdb', '--version'],
Expand Down
8 changes: 4 additions & 4 deletionstests/test_simple.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -501,15 +501,15 @@ def test_logical_replication(self):
sub.disable()
node1.safe_psql('insert into test values (3, 3)')

# enable and ensure that data successfullytransfered
# enable and ensure that data successfullytransferred
sub.enable()
sub.catchup()
res = node2.execute('select * from test')
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3)])

# Add new tables. Since we added "all tables" to publication
# (default behaviour of publish() method) we don't need
# toexplicitely perform pub.add_tables()
# toexplicitly perform pub.add_tables()
create_table = 'create table test2 (c char)'
node1.safe_psql(create_table)
node2.safe_psql(create_table)
Expand All@@ -526,7 +526,7 @@ def test_logical_replication(self):
pub.drop()

# create new publication and subscription for specific table
# (ommitting copying data as it's already done)
# (omitting copying data as it's already done)
pub = node1.publish('newpub', tables=['test'])
sub = node2.subscribe(pub, 'newsub', copy_data=False)

Expand All@@ -535,7 +535,7 @@ def test_logical_replication(self):
res = node2.execute('select * from test')
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3), (4, 4)])

#explicitely add table
#explicitly add table
with self.assertRaises(ValueError):
pub.add_tables([]) # fail
pub.add_tables(['test2'])
Expand Down
8 changes: 4 additions & 4 deletionstests/test_simple_remote.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -480,15 +480,15 @@ def test_logical_replication(self):
sub.disable()
node1.safe_psql('insert into test values (3, 3)')

# enable and ensure that data successfullytransfered
# enable and ensure that data successfullytransferred
sub.enable()
sub.catchup()
res = node2.execute('select * from test')
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3)])

# Add new tables. Since we added "all tables" to publication
# (default behaviour of publish() method) we don't need
# toexplicitely perform pub.add_tables()
# toexplicitly perform pub.add_tables()
create_table = 'create table test2 (c char)'
node1.safe_psql(create_table)
node2.safe_psql(create_table)
Expand All@@ -505,7 +505,7 @@ def test_logical_replication(self):
pub.drop()

# create new publication and subscription for specific table
# (ommitting copying data as it's already done)
# (omitting copying data as it's already done)
pub = node1.publish('newpub', tables=['test'])
sub = node2.subscribe(pub, 'newsub', copy_data=False)

Expand All@@ -514,7 +514,7 @@ def test_logical_replication(self):
res = node2.execute('select * from test')
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3), (4, 4)])

#explicitely add table
#explicitly add table
with self.assertRaises(ValueError):
pub.add_tables([]) # fail
pub.add_tables(['test2'])
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp