Thread: Problem with restore

Problem with restore

From
Kieran McCusker
Date:
Hi

Sorry if this has been raised before but I have just tried to restore a 
table from one of my schemas.

The problem was that this table name is very common - It is used in many 
schemas as each schema is the data for an individual client.

Restore has the three disabled checkboxes
Only data    (checked)
Only schema    (unchecked)
Single object    (checked)

and then below
Table (my table name)

I assumed was it was going to restore only the selected table - What it 
actually did was restore all tables with that name!

This seems confusing at best (and how would you do what I wanted using 
the UI?)

Shouldn't the schema be checked as well?

Many thanks

Kieran






Re: Problem with restore

From
Guillaume Lelarge
Date:
Hi,

Le 20/04/2010 18:18, Kieran McCusker a écrit :
> [...]
> Sorry if this has been raised before but I have just tried to restore a
> table from one of my schemas.
> 
> The problem was that this table name is very common - It is used in many
> schemas as each schema is the data for an individual client.
> 
> Restore has the three disabled checkboxes
> Only data    (checked)
> Only schema    (unchecked)
> Single object    (checked)
> 
> and then below
> Table (my table name)
> 
> I assumed was it was going to restore only the selected table - What it
> actually did was restore all tables with that name!
> 

Yes, the Restore window launches pg_restore with the --table option, but
doesn't specify the schema name.

> This seems confusing at best (and how would you do what I wanted using
> the UI?)
> 

There's no way to do this with the UI. But this is a bug and should be
fixed.

> Shouldn't the schema be checked as well?
> 

Yes.

The good behaviour is already available in the backup window. I just
need to push it also in the restore window. Will do this evening.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Problem with restore

From
Guillaume Lelarge
Date:
Le 20/04/2010 18:52, Guillaume Lelarge a écrit :
> Hi,
> 
> Le 20/04/2010 18:18, Kieran McCusker a écrit :
>> [...]
>> Sorry if this has been raised before but I have just tried to restore a
>> table from one of my schemas.
>>
>> The problem was that this table name is very common - It is used in many
>> schemas as each schema is the data for an individual client.
>>
>> Restore has the three disabled checkboxes
>> Only data    (checked)
>> Only schema    (unchecked)
>> Single object    (checked)
>>
>> and then below
>> Table (my table name)
>>
>> I assumed was it was going to restore only the selected table - What it
>> actually did was restore all tables with that name!
>>
> 
> Yes, the Restore window launches pg_restore with the --table option, but
> doesn't specify the schema name.
> 
>> This seems confusing at best (and how would you do what I wanted using
>> the UI?)
>>
> 
> There's no way to do this with the UI. But this is a bug and should be
> fixed.
> 
>> Shouldn't the schema be checked as well?
>>
> 
> Yes.
> 
> The good behaviour is already available in the backup window. I just
> need to push it also in the restore window. Will do this evening.
> 

Fixed for the next 1.10 and the future 1.12 releases.

Thanks for your report.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com