Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
adding key -F to pg_dump #32
Conversation
You should fix code style for this pull request. Major problems from pep8 checker but also will be good if you remove comments lines. |
Tests should be based on unittest library. |
@@ -583,8 +583,8 @@ def cleanup(self, max_attempts=3): | |||
def psql(self, | |||
dbname, | |||
query=None, | |||
filename=None, |
funbringer
Feb 6, 2018
Collaborator
Arguments should not be moved around.
Arguments should not be moved around.
@@ -658,7 +658,7 @@ def safe_psql(self, dbname, query, username=None, input=None): | |||
|
|||
return out | |||
|
|||
def dump(self, dbname, username=None, filename=None): | |||
def dump(self, dbname, username=None, filename=None, formate=None): |
funbringer
Feb 6, 2018
Collaborator
Probably should replace formate
with format
(I know, it's a function name, but who cares).
Probably should replace formate
with format
(I know, it's a function name, but who cares).
Fenimorkin
Apr 28, 2018
Author
Contributor
done
done
Returns: | ||
Path to a file containing dump. | ||
""" | ||
|
||
# Set default arguments | ||
username = username or _default_username() | ||
formate = formate or "p" |
funbringer
Feb 6, 2018
Collaborator
"p" should be replaced with a const defined in consts.py
"p" should be replaced with a const defined in consts.py
Fenimorkin
Apr 28, 2018
Author
Contributor
done
done
# 1) make dump to new place | ||
# pg_dump mydb > db.sql | ||
# 2) make dump to non default formate | ||
# 2.5) Чтобы сформировать выгрузку в формате plain: |
funbringer
Feb 6, 2018
Collaborator
Russian comments is a big no-no.
Russian comments is a big no-no.
I think we should drop this PR. |
@stalkerg I believe we should give @Fenimorkin a chance to finish his work. |
Can you ask him directly? Maybe he has no plans to finish that. |
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 97.17% 97.01% -0.17%
==========================================
Files 16 16
Lines 1381 1405 +24
==========================================
+ Hits 1342 1363 +21
- Misses 39 42 +3
Continue to review full report at Codecov.
|
Added key unnecessary formate for dump()
-F format
--format=format
Selects the format of the output. format can be one of the following:
p
plain
Output a plain-text SQL script file (the default).
c
custom
Output a custom-format archive suitable for input into pg_restore. Together with the directory output format, this is the most flexible output format in that it allows manual selection and reordering of archived items during restore. This format is also compressed by default.
d
directory