Skip to content

Commit

Permalink
pg_dumpall completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Serodio committed Sep 21, 2012
1 parent 9cca892 commit e9f3294
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion src/_pgsql_utils
@@ -1,4 +1,4 @@
#compdef psql pg_dump createdb dropdb vacuumdb createuser dropuser initdb
#compdef psql pg_dump pg_dumpall createdb dropdb vacuumdb createuser dropuser initdb
# ------------------------------------------------------------------------------
# Description
# -----------
Expand All @@ -15,6 +15,8 @@
#
# * Johann 'Myrkraverk' Oskarsson <johann@2ndquadrant.com>
#
# * Daniel Serodio <dserodio@gmail.com> pg_dumpall completion
#
# ------------------------------------------------------------------------------


Expand Down Expand Up @@ -214,6 +216,35 @@ _pg_dump () {
--use-set-session-authorization'[use SET SESSION AUTHORIZATION commands instead of ALTER OWNER]'
}

_pg_dumpall () {
local curcontext="$curcontext" state line expl
typeset -A opt_args

_arguments -C -s \
"$_pgsql_common_opts[@]" \
{-a,--data-only}'[dump only data]' \
{-c,--clean}'[include clean (drop) cmds brefore recreating]' \
{-g,--globals-only}'[dump only global objects, no databases]' \
{-f+,--file=}':output file:_files' \
{-o,--oids}'[dump objects identifiers for every table]' \
{-O,--no-owner}'[dont recreate as same owner]' \
{-r,--roles-only}'[no databases or tablespaces, only roles]' \
{-s,--schema-only}'[no data, only schema]' \
{-S+,--superuser=}':superuser name:_pgsql_users' \
{-t,--tablespaces-only}'[no databases or roles, only tablespaces]' \
{-x,--no-privileges}'[dont dump ACLs]' \
--binary-upgrade'[for use by upgrade utilities only]' \
--column-inserts'[use INSERT with column names not COPY]' \
--disable-dollar-quoting'[disable dollar quoting, use SQL standard quoting]' \
--disable-triggers'[disable triggers during data-only restore]' \
--inserts'[use INSERT not COPY]' \
--no-security-labels'[do not dump security label assignments]' \
--no-tablespaces'[do not dump tablespace assignments]' \
--no-unlogged-table-data'[do not dump unlogged table data]' \
--quote-all-identifiers'[quote all identifiers, even if not key words]' \
--use-set-session-authorization'[use SET SESSION AUTHORIZATION cmds instead of ALTER OWNER]'
}

_createdb () {
local curcontext="$curcontext" state line expl
typeset -A opt_args
Expand Down

0 comments on commit e9f3294

Please sign in to comment.