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

adding key -F to pg_dump#32

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
funbringer merged 13 commits intopostgrespro:masterfromFenimorkin:pg_dump
May 8, 2018
Merged

Conversation

Fenimorkin
Copy link
Contributor

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

    Output a directory-format archive suitable for input into pg_restore. This will create a directory with one file for each table and blob being dumped, plus a so-called Table of Contents file describing the dumped objects in a machine-readable format that pg_restore can read. A directory format archive can be manipulated with standard Unix tools; for example, files in an uncompressed archive can be compressed with the gzip tool. This format is compressed by default and also supports parallel dumps. ttar    Output a tar-format archive suitable for input into pg_restore. The tar format is compatible with the directory format: extracting a tar-format archive produces a valid directory-format archive. However, the tar format does not support compression. Also, when using tar format the relative order of table data items cannot be changed during restore.

@stalkerg
Copy link
Contributor

stalkerg commentedFeb 5, 2018
edited
Loading

You should fix code style for this pull request. Major problems from pep8 checker but also will be good if you remove comments lines.

@ildus
Copy link
Collaborator

ildus commentedFeb 6, 2018
edited
Loading

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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Probably should replaceformate withformat (I know, it's a function name, but who cares).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

done


Returns:
Path to a file containing dump.
"""

# Set default arguments
username = username or _default_username()
formate = formate or "p"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

"p" should be replaced with a const defined in consts.py

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

done

# 1) make dump to new place
# pg_dump mydb > db.sql
# 2) make dump to non default formate
# 2.5) Чтобы сформировать выгрузку в формате plain:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Russian comments is a big no-no.

@stalkerg
Copy link
Contributor

I think we should drop this PR.

@funbringer
Copy link
Collaborator

@stalkerg I believe we should give@Fenimorkin a chance to finish his work.

@stalkerg
Copy link
Contributor

Can you ask him directly? Maybe he has no plans to finish that.

@codecov-io
Copy link

codecov-io commentedApr 28, 2018
edited
Loading

Codecov Report

Merging#32 intomaster willdecrease coverage by0.16%.
The diff coverage is91.42%.

Impacted file tree graph

@@            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
Impacted FilesCoverage Δ
setup.py0% <ø> (ø)⬆️
testgres/enums.py100% <100%> (ø)⬆️
tests/test_simple.py99.78% <100%> (ø)⬆️
testgres/node.py96.87% <84.21%> (-0.7%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatee9d2a40...bb88d6e. Read thecomment docs.

@funbringerfunbringer merged commit221df4f intopostgrespro:masterMay 8, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@funbringerfunbringerfunbringer approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@Fenimorkin@stalkerg@ildus@funbringer@codecov-io

[8]ページ先頭

©2009-2025 Movatter.jp