From: | "David Dunwoody" <david(dot)dunwoody(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3913: pg_dump -T option not recognised |
Date: | 2008-01-30 18:33:45 |
Message-ID: | f6956c7a0801301033w59c26c1eg18afe5358490a1c5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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> wrote:
>
> Zdenek Kotala <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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Marcus Torres | 2008-01-30 18:34:33 | BUG #3914: Self-Join Group-By Clause Produces Incorrect Results |
Previous Message | Tom Lane | 2008-01-30 17:32:05 | Re: BUG #3913: pg_dump -T option not recognised |