Обсуждение: Restoring a table with blobs - Without doing a full restore - Is it even possible ?

Поиск
Список
Период
Сортировка

Restoring a table with blobs - Without doing a full restore - Is it even possible ?

От
o.blomqvist@secomintl.com (Otto Blomqvist)
Дата:
Hello !

I have a table that is created as follows

Create Table file_200 (Record_number integer, Customer_Image OID;
CREATE UNIQUE INDEX file_200_Record_Number_Key ON file_200
(record_number);

I store pictures using (In Delphi 7)

PSQLImageQuery.Edit;
PSQLImageQuerycustomer_image.LoadFromFile('c:\tmp.jpg');
PSQLImageQuery.Post;

Everything works just wonderfully, even a full dump and restore works
like a charm (Using pg_dump, pg_restore).

Now, of course thats not good enough..hehe. I need to be able to make
a partial restore of the picture table only (there are about 30
diffrent tables, it is not a huge database, 30MB compressed tar.gz). I
tried using the pg_restore -t flag and it runs threw with no errors.
The problem is that the pictures are simply not there and I can not
even overwrite them with new ones. Also, the index is not restored.
When I load the pictures I simply do a "where record_number=##" query
and then the DBImage component does the rest.

I am using PSQL 7.2

Any ideas ?

Thanks a lot

/otto blomqvist