Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: BUG #3913: pg_dump -T option not recognised



David Dunwoody wrote:
OK, just reproduced with 8.2.6 compiled from source on Ubuntu 7.10 (all updates applied as a couple of hours ago).

Steps to reproduce. Forgive any typos, this isn't all from bash_history, but was done on a machine that never had postgresql on it before (specifically, my laptop).

Command output is shown between ... characters.

** Basic install and clean DB setup:

wget http://mirror/postgresql-8.2.6.tar.gz
tar zxvf postgres-8.2.6.tar.gz
cd postgresql-8.2.6
./configure --prefix=/opt/postgres
make
sudo make install
sudo lndir /opt/postgres/bin /usr/local/bin
sudo mkdir /opt/postgres/data
sudo chown postgres /opt/postgres/data
sudo adduser postgres
sudo su - postgres
initdb -D /opt/postgres/data
postgres -D /opt/postgres/data > logfile 2>&1 &
createdb test
psql test

** Create test tables:

create table a ( col1 date, col2 date );
create table b ( col1 date, col2 date );
create table c ( col1 date, col2 date );

exit psql

** Sanity check psql:

pg_dump -v test > /dev/null

...
pg_dump: creating TABLE a
pg_dump: creating TABLE b
pg_dump: creating TABLE c
...

As expected

** Check --exclude-table option:

pg_dump -v --exclude-table=b test > /dev/null

...
pg_dump: creating TABLE a
pg_dump: creating TABLE c
...

As expected

** Check -T option:

pg_dump -v -T=b test > /dev/null

...
pg_dump: creating TABLE a
pg_dump: creating TABLE b
pg_dump: creating TABLE c
...

Silently ignores -T


I hope I'm an idiot, but that looks like a bug according to pg_dump --help which says:

...
-T, --exclude-table=TABLE   do NOT dump the named table(s)
...


Hope that helps you reproduce it.

Cheers,

David



On 30/01/2008, *Tom Lane* <tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:

    Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM
    <mailto:Zdenek(dot)Kotala(at)Sun(dot)COM>> writes:
    > David Dunwoody wrote:
    >> When running pg_dump, the -T option for table exclusion is
    ignored, but
    >> --exclude-table does work.

    > It works for me. Can you recheck it again?

    Works for me too, on Fedora 8.  But could you give a complete example?
    Maybe there's some other contributing factor in the particular case
    you're trying.

                            regards, tom lane


Hola, hasta donde veo lo que esta de mas es el igual (=) -T=b debe decir -T b

Saludos Fernando



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group