pg_dump "all tables" in 7.3.X

Started by Paul Ramseyover 22 years ago10 messages
#1Paul Ramsey
pramsey@refractions.net

We are trying to do an "all tables" dump using the 7.3.3 pg_dump, but
are getting no love. The pg_dump command which worked before, in 7.2,
no longer returns any tables:

pg_dump -t "*" dbname

Is this by design, or by accident?

Paul

--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey@refractions.net
| Phone: (250) 885-0632
\_

#2Andrew Gould
andrewgould@yahoo.com
In reply to: Paul Ramsey (#1)
Re: pg_dump "all tables" in 7.3.X
--- Paul Ramsey <pramsey@refractions.net> wrote:

We are trying to do an "all tables" dump using the
7.3.3 pg_dump, but
are getting no love. The pg_dump command which
worked before, in 7.2,
no longer returns any tables:

pg_dump -t "*" dbname

Is this by design, or by accident?

Paul

try 'pg_dumpall dbname'

Best of luck,

Andrew

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Paul Ramsey (#1)
Re: pg_dump "all tables" in 7.3.X

Paul Ramsey <pramsey@refractions.net> writes:

We are trying to do an "all tables" dump using the 7.3.3 pg_dump, but
are getting no love. The pg_dump command which worked before, in 7.2,
no longer returns any tables:
pg_dump -t "*" dbname
Is this by design, or by accident?

By design. Just omit the -t switch if you want all tables.

("*" is a legal table name, if perhaps not a very bright choice, so the
old behavior was really not consistent.)

regards, tom lane

#4Paul Ramsey
pramsey@refractions.net
In reply to: Tom Lane (#3)
Re: pg_dump "all tables" in 7.3.X

What the old 7.2 behavior gave us was the ability to dump all tables and
views, but not dump all the functions and triggers. Is there an
equivalent to that behavior still around?

Tom Lane wrote:

Paul Ramsey <pramsey@refractions.net> writes:

We are trying to do an "all tables" dump using the 7.3.3 pg_dump, but
are getting no love. The pg_dump command which worked before, in 7.2,
no longer returns any tables:
pg_dump -t "*" dbname
Is this by design, or by accident?

By design. Just omit the -t switch if you want all tables.

("*" is a legal table name, if perhaps not a very bright choice, so the
old behavior was really not consistent.)

regards, tom lane

--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey@refractions.net
| Phone: (250) 885-0632
\_

#5Paul Ramsey
pramsey@refractions.net
In reply to: Tom Lane (#3)
Re: [GENERAL] pg_dump "all tables" in 7.3.X

Oh, if it's by design then the "pg_dump --help" text should be updated
correspondingly. The online doco is already correct.

Tom Lane wrote:

Paul Ramsey <pramsey@refractions.net> writes:

We are trying to do an "all tables" dump using the 7.3.3 pg_dump, but
are getting no love. The pg_dump command which worked before, in 7.2,
no longer returns any tables:
pg_dump -t "*" dbname
Is this by design, or by accident?

By design. Just omit the -t switch if you want all tables.

("*" is a legal table name, if perhaps not a very bright choice, so the
old behavior was really not consistent.)

regards, tom lane

--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey@refractions.net
| Phone: (250) 885-0632
\_

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Paul Ramsey (#5)
Re: [GENERAL] pg_dump "all tables" in 7.3.X

Paul Ramsey <pramsey@refractions.net> writes:

Oh, if it's by design then the "pg_dump --help" text should be updated
correspondingly. The online doco is already correct.

Hm. Wait a minute --- I was thinking of 7.4 not 7.3. The "*" hack does
appear to still be there in the 7.3 source code. Are you sure you're
typing the command just like that?

pg_dump -t "*" dbname

regards, tom lane

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Paul Ramsey (#4)
Re: pg_dump "all tables" in 7.3.X

Paul Ramsey <pramsey@refractions.net> writes:

What the old 7.2 behavior gave us was the ability to dump all tables and
views, but not dump all the functions and triggers. Is there an
equivalent to that behavior still around?

Not at the moment. It would be a fine project to add more selectivity
options to pg_dump.

I wouldn't even object to reintroducing * into -t, if it were done
properly (ie, a real wild-card-match implementation, and not just a
two-line kluge that handles the one case) ...

regards, tom lane

#8Andrew Gould
andrewgould@yahoo.com
In reply to: Andrew Gould (#2)
Re: pg_dump "all tables" in 7.3.X

oops that would be all databases

sorry

--- Andrew Gould <andrewgould@yahoo.com> wrote:
Show quoted text
--- Paul Ramsey <pramsey@refractions.net> wrote:

We are trying to do an "all tables" dump using the
7.3.3 pg_dump, but
are getting no love. The pg_dump command which
worked before, in 7.2,
no longer returns any tables:

pg_dump -t "*" dbname

Is this by design, or by accident?

Paul

try 'pg_dumpall dbname'

Best of luck,

Andrew

---------------------------(end of
broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose
an index scan if your
joining column's datatypes do not match

#9Paul Ramsey
pramsey@refractions.net
In reply to: Tom Lane (#6)
Re: [GENERAL] pg_dump "all tables" in 7.3.X

Entirely sure:

[pramsey@hydra pg_dump]$ which pg_dump
/opt/pgsql73/bin/pg_dump
[pramsey@hydra pg_dump]$ pg_dump -t "*" pramsey
--
-- PostgreSQL database dump
--

[pramsey@hydra pg_dump]$

Tom Lane wrote:

Paul Ramsey <pramsey@refractions.net> writes:

Oh, if it's by design then the "pg_dump --help" text should be updated
correspondingly. The online doco is already correct.

Hm. Wait a minute --- I was thinking of 7.4 not 7.3. The "*" hack does
appear to still be there in the 7.3 source code. Are you sure you're
typing the command just like that?

pg_dump -t "*" dbname

regards, tom lane

--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey@refractions.net
| Phone: (250) 885-0632
\_

#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Paul Ramsey (#9)
Re: [GENERAL] pg_dump "all tables" in 7.3.X

Paul Ramsey <pramsey@refractions.net> writes:

Entirely sure:

Hmph. There must be some bug in the 7.3 code for it then. Since we've
already ripped out that code for 7.4, I'm not too excited about finding
the problem...

regards, tom lane