Thread: BUG #3377: pg_dump: No matching tables were found

BUG #3377: pg_dump: No matching tables were found

From
"Kevin Neufeld"
Date:
The following bug has been logged online:

Bug reference:      3377
Logged by:          Kevin Neufeld
Email address:      kneufeld@refractions.net
PostgreSQL version: 8.2.4
Operating system:   Linux Fedora Core 3
Description:        pg_dump: No matching tables were found
Details:

pg_dump does not seem to use -n to qualify a table dump.

$ psql -U postgres -c "create schema test" postgres
CREATE SCHEMA

$ psql -U postgres -c "create table test.mytable()" postgres
CREATE TABLE

$ pg_dump -U postgres -t mytable postgres | less
pg_dump: No matching tables were found

$ pg_dump -U postgres -n test -t mytable postgres | less
pg_dump: No matching tables were found

$ psql -U postgres -c "alter user postgres set search_path to test, public"
postgres
ALTER ROLE

$ pg_dump -U postgres -n test -t mytable postgres | less
--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET ...

Re: BUG #3377: pg_dump: No matching tables were found

From
Alvaro Herrera
Date:
Kevin Neufeld wrote:

> $ pg_dump -U postgres -t mytable postgres | less
> pg_dump: No matching tables were found
>
> $ pg_dump -U postgres -n test -t mytable postgres | less
> pg_dump: No matching tables were found

Try pg_dump -t test.mytable

Then check the docs of the new version, which state

: Note:  The behavior of the -t switch is not entirely upward compatible
: with pre-8.2 PostgreSQL versions. Formerly, writing -t tab would dump
: all tables named tab, but now it just dumps whichever one is visible in
: your default search path. To get the old behavior you can write -t
: '*.tab'. Also, you must write something like -t sch.tab to select a
: table in a particular schema, rather than the old locution of -n sch -t
: tab.

http://www.postgresql.org/docs/8.2/static/app-pgdump.html

--
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
"Nunca confiaré en un traidor.  Ni siquiera si el traidor lo he creado yo"
(Barón Vladimir Harkonnen)

Re: BUG #3377: pg_dump: No matching tables were found

From
Christian Gonzalez
Date:
I Think that your problem is:  test.mytable() <> test.mytable, why your
table name include --> ()

On Fri, 2007-06-08 at 16:59 +0000, Kevin Neufeld wrote:
> The following bug has been logged online:
>
> Bug reference:      3377
> Logged by:          Kevin Neufeld
> Email address:      kneufeld@refractions.net
> PostgreSQL version: 8.2.4
> Operating system:   Linux Fedora Core 3
> Description:        pg_dump: No matching tables were found
> Details:
>
> pg_dump does not seem to use -n to qualify a table dump.
>
> $ psql -U postgres -c "create schema test" postgres
> CREATE SCHEMA
>
> $ psql -U postgres -c "create table test.mytable()" postgres
> CREATE TABLE
>
> $ pg_dump -U postgres -t mytable postgres | less
> pg_dump: No matching tables were found
>
> $ pg_dump -U postgres -n test -t mytable postgres | less
> pg_dump: No matching tables were found
>
> $ psql -U postgres -c "alter user postgres set search_path to test, public"
> postgres
> ALTER ROLE
>
> $ pg_dump -U postgres -n test -t mytable postgres | less
> --
> -- PostgreSQL database dump
> --
>
> SET client_encoding = 'UTF8';
> SET ...
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>


--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.