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

Commita33860d

Browse files
PSQL passes a database name through the explicit '-d <dbname>' parameter
1 parent2fa4426 commita33860d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎testgres/node.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,13 +1107,12 @@ def _psql(
11071107
else:
11081108
raiseException("Input data must be None or bytes.")
11091109

1110-
dbname=dbnameordefault_dbname()
1111-
11121110
psql_params= [
11131111
self._get_bin_path("psql"),
11141112
"-p",str(self.port),
11151113
"-h",self.host,
11161114
"-U",usernameorself.os_ops.username,
1115+
"-d",dbnameordefault_dbname(),
11171116
"-X",# no .psqlrc
11181117
"-A",# unaligned output
11191118
"-t",# print rows only
@@ -1135,9 +1134,6 @@ def _psql(
11351134
else:
11361135
raiseQueryException('Query or filename must be provided')
11371136

1138-
# should be the last one
1139-
psql_params.append(dbname)
1140-
11411137
returnself.os_ops.exec_command(
11421138
psql_params,
11431139
verbose=True,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp