Thread: Win32 pg_dump fails for single table backup

Win32 pg_dump fails for single table backup

From
Arnaud Lesauvage
Date:
Hi list !

I found this bug already mentionned in the archives of January 2007, but it was supposed to be fixed in 1.6.3.
Obviously it is not so, since I still have the error "No matching tables were found" when trying to perform a single
tablebackup/
 

Dave Page wrote :
>> The command currently generated by pgadmin is not following a rule
>> described in the pg_dump documentation (the second note on the '-t'
>> option) :
>>
>> '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'
> 
> Erk - I've committed fixes to SVN for this for v1.6.3. 

I usually copy the pg_dump command and correct it manually, but is there a fix somewhere for this ?

Thanks a lot !

--
Arnaud


Re: Win32 pg_dump fails for single table backup

From
"simon.abele@gmail.com"
Date:
On Apr 16, 8:49 am, arnaud.lesauv...@supermail.fr (Arnaud Lesauvage)
wrote:
> Hi list !
>
> I found this bug already mentionned in the archives of January 2007, but it was supposed to be fixed in 1.6.3.
> Obviously it is not so, since I still have the error "No matching tables were found" when trying to perform a single
tablebackup/
 
>
> Dave Page wrote :
>
> >> The command currently generated by pgadmin is not following a rule
> >> described in the pg_dump documentation (the second note on the '-t'
> >> option) :
>
> >> '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'
>
> > Erk - I've committed fixes to SVN for this for v1.6.3.
>
> I usually copy the pg_dump command and correct it manually, but is there a fix somewhere for this ?
>
> Thanks a lot !
>
> --
> Arnaud
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majord...@postgresql.org so that your
>        message can get through to the mailing list cleanly

Hi,

I second this bug - i'm experiencing the same problem trying to backup
(dump) tables with mixed case names (e.g. MyTableName). I've installed
pgAdmin v1.6.3 and attempted to backup (compressed and plain, within
pgadmin, from cmd line) some tables with mixed case names, so far
without success. I'm able to dump out all lower case named tables
(e.g. mytablename) but NOT mixed case named tables.

Example error;

<log>
C:\Program Files\pgAdmin III\1.6>pg_dump.exe -i -h localhost -p 5432 -
U postgres-F c -v -f "C:\temp\out.backup" -t '"AddressPoint"' -n public
os_mastermap
pg_dump: No matching tables were found
pg_dump: *** aborted because of error
</log>

As you can see the offending table name has been double quoted, as
specified in the pgsql 8.2 docs (http://www.postgresql.org/docs/8.2/
interactive/app-pgdump.html)

Apologies if some form of this post has been posted to other group
members directly, may have submitted using the wrong link within
Google Groups.

Any help/suggestions would be greatly appreciated at this point.

Many thank,
Simon Abele



Re: Win32 pg_dump fails for single table backup

From
"simon.abele@gmail.com"
Date:
On Apr 16, 8:49 am, arnaud.lesauv...@supermail.fr (Arnaud Lesauvage)
wrote:
> Hi list !
>
> I found this bug already mentionned in the archives of January 2007, but it was supposed to be fixed in 1.6.3.
> Obviously it is not so, since I still have the error "No matching tables were found" when trying to perform a single
tablebackup/
 
>
> Dave Page wrote :
>
> >> The command currently generated by pgadmin is not following a rule
> >> described in the pg_dump documentation (the second note on the '-t'
> >> option) :
>
> >> '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'
>
> > Erk - I've committed fixes to SVN for this for v1.6.3.
>
> I usually copy the pg_dump command and correct it manually, but is there a fix somewhere for this ?
>
> Thanks a lot !
>
> --
> Arnaud
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majord...@postgresql.org so that your
>        message can get through to the mailing list cleanly

Hi,

I second this bug - i'm experiencing the same problem trying to backup
(dump) tables with mixed case names (e.g. MyTableName). I've installed
pgAdmin v1.6.3 and attempted to backup (compressed and plain, within
pgadmin, from cmd line) some tables with mixed case names, so far
without success. I'm able to dump out all lower case named tables
(e.g. mytablename) but NOT mixed case named tables.

Example error;

<log>
C:\Program Files\pgAdmin III\1.6>pg_dump.exe -i -h localhost -p 5432 -
U postgres-F c -v -f "C:\temp\out.backup" -t '"AddressPoint"' -n public
os_mastermap
pg_dump: No matching tables were found
pg_dump: *** aborted because of error
</log>

As you can see the offending table name has been double quoted, as
specified in the pgsql 8.2 docs (http://www.postgresql.org/docs/8.2/
interactive/app-pgdump.html)

Apologies if some form of this post has been posted to other group
members directly, may have submitted using the wrong link within
Google Groups.

Any help/suggestions would be greatly appreciated at this point.

Many thank,
Simon Abele



Re: Win32 pg_dump fails for single table backup

From
Arnaud Lesauvage
Date:
simon.abele@gmail.com a écrit :
> On Apr 16, 8:49 am, arnaud.lesauv...@supermail.fr (Arnaud Lesauvage)
> wrote:
>> I found this bug already mentionned in the archives of January 2007, but it was supposed to be fixed in 1.6.3.
>> Obviously it is not so, since I still have the error "No matching tables were found" when trying to perform a single
tablebackup/
 
> 
> I second this bug - i'm experiencing the same problem trying to backup
> (dump) tables with mixed case names (e.g. MyTableName). I've installed
> pgAdmin v1.6.3 and attempted to backup (compressed and plain, within
> pgadmin, from cmd line) some tables with mixed case names, so far
> without success. I'm able to dump out all lower case named tables
> (e.g. mytablename) but NOT mixed case named tables.

I believe the problem is more with a change in the syntax of pg_dump's -t switch since version 8.2.
I quote the manual :
"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
ina particular schema, rather than the old locution of -n sch -t tab."
 

So the syntax "-t <table> -n <schema>" used by pgAdmin is not correct anymore.

--
Arnaud


Re: Win32 pg_dump fails for single table backup

From
Dave Page
Date:
Arnaud Lesauvage wrote:
> simon.abele@gmail.com a écrit :
>> I second this bug - i'm experiencing the same problem trying to backup
>> (dump) tables with mixed case names (e.g. MyTableName). I've installed
>> pgAdmin v1.6.3 and attempted to backup (compressed and plain, within
>> pgadmin, from cmd line) some tables with mixed case names, so far
>> without success. I'm able to dump out all lower case named tables
>> (e.g. mytablename) but NOT mixed case named tables.
> 
> So the syntax "-t <table> -n <schema>" used by pgAdmin is not correct 
> anymore.

Are you sure you're running 1.6.3? I get (not the non default schema, 
and that both the schema and table names need quoting):

C:\Program Files\PostgreSQL\8.2\bin\pg_dump.exe -i -h localhost -p 5432 
-U postgres -F c -v -f "c:\foo.bak" -t "\"FOO\".\"Role\"" postgres
pg_dump: reading schemas
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined conversions
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: reading type casts
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "Role"
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading indexes for table "Role"
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading dependency data
pg_dump: saving encoding = LATIN1
pg_dump: saving standard_conforming_strings = off
pg_dump: dumping contents of table Role

Process returned exit code 0.

Regards, Dave


Re: Win32 pg_dump fails for single table backup

From
"Simon Abele"
Date:
Thanks.

Double quoting as suggested solves the problem and all seems to be working as i expected. In particular i wasn't quoting the schema name, rather i quoted the combined <schema>.<table> string.

Regards, Simon

On 17/04/07, Dave Page <dpage@postgresql.org> wrote:
Arnaud Lesauvage wrote:
> simon.abele@gmail.com a écrit :
>> I second this bug - i'm experiencing the same problem trying to backup
>> (dump) tables with mixed case names ( e.g. MyTableName). I've installed
>> pgAdmin v1.6.3 and attempted to backup (compressed and plain, within
>> pgadmin, from cmd line) some tables with mixed case names, so far
>> without success. I'm able to dump out all lower case named tables
>> (e.g. mytablename) but NOT mixed case named tables.
>
> So the syntax "-t <table> -n <schema>" used by pgAdmin is not correct
> anymore.

Are you sure you're running 1.6.3? I get (not the non default schema,
and that both the schema and table names need quoting):

C:\Program Files\PostgreSQL\8.2\bin\pg_dump.exe -i -h localhost -p 5432
-U postgres -F c -v -f "c:\foo.bak" -t "\"FOO\".\"Role\"" postgres
pg_dump: reading schemas
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined conversions
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: reading type casts
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "Role"
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading indexes for table "Role"
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading dependency data
pg_dump: saving encoding = LATIN1
pg_dump: saving standard_conforming_strings = off
pg_dump: dumping contents of table Role

Process returned exit code 0.

Regards, Dave

Re: Win32 pg_dump fails for single table backup

From
Arnaud Lesauvage
Date:
Dave Page a écrit :
> Are you sure you're running 1.6.3? I get (not the non default schema, 
> and that both the schema and table names need quoting):
> 
> C:\Program Files\PostgreSQL\8.2\bin\pg_dump.exe -i -h localhost -p 5432 
> -U postgres -F c -v -f "c:\foo.bak" -t "\"FOO\".\"Role\"" postgres

That's very strange !
I get :

C:\Program Files\pgAdmin III\1.6\pg_dump.exe -i -h localhost -p 5432 -U postgres -F c -v -f "D:\foo.backup" -t
"FooTable"-n "FOO" postgres
 

Note that :
-path is to pdAdmin's folder, not PostgreSQL's.
-both switches are used.

"About" tells me that I use pgAdmin 1.6.3 (Mar 23 2007, rev:6112).
I "think" I installed over an older version of pgAdmin.
Maybe I should try reinstalling ?

Regards
--
Arnaud





Re: Win32 pg_dump fails for single table backup

From
Dave Page
Date:
Arnaud Lesauvage wrote:
> Dave Page a écrit :
>> Are you sure you're running 1.6.3? I get (not the non default schema, 
>> and that both the schema and table names need quoting):
>>
>> C:\Program Files\PostgreSQL\8.2\bin\pg_dump.exe -i -h localhost -p 
>> 5432 -U postgres -F c -v -f "c:\foo.bak" -t "\"FOO\".\"Role\"" postgres
> 
> That's very strange !
> I get :
> 
> C:\Program Files\pgAdmin III\1.6\pg_dump.exe -i -h localhost -p 5432 -U 
> postgres -F c -v -f "D:\foo.backup" -t "FooTable" -n "FOO" postgres

What does

C:\Program Files\pgAdmin III\1.6\pg_dump.exe --version

return?

Regards, Dave


Re: Win32 pg_dump fails for single table backup

From
Arnaud Lesauvage
Date:
Dave Page a écrit :
> What does
> 
> C:\Program Files\pgAdmin III\1.6\pg_dump.exe --version
> 
> return?

>"C:\Program Files\pgAdmin III\1.6\pg_dump.exe" --version
"pg_dump (PostgreSQL) 8.3devel"

Is that correct ?

Regards
--
Arnaud


Re: Win32 pg_dump fails for single table backup

From
Dave Page
Date:
Arnaud Lesauvage wrote:
> Dave Page a écrit :
>> What does
>>
>> C:\Program Files\pgAdmin III\1.6\pg_dump.exe --version
>>
>> return?
> 
>> "C:\Program Files\pgAdmin III\1.6\pg_dump.exe" --version
> "pg_dump (PostgreSQL) 8.3devel"

No - please replace it with one from an 8.2 installation.

Regards, Dave.


Re: Win32 pg_dump fails for single table backup

From
Arnaud Lesauvage
Date:
Dave Page a écrit :
> Arnaud Lesauvage wrote:
>> Dave Page a écrit :
>>> What does
>>>
>>> C:\Program Files\pgAdmin III\1.6\pg_dump.exe --version
>>>
>>> return?
>> 
>>> "C:\Program Files\pgAdmin III\1.6\pg_dump.exe" --version
>> "pg_dump (PostgreSQL) 8.3devel"
> 
> No - please replace it with one from an 8.2 installation.

Replaced it with pg_dump from my current install (8.2.3), and it works great !
Thanks Dave !

Regards
--
Arnaud