Thread: Exporting Table-Specified BLOBs Only?

Exporting Table-Specified BLOBs Only?

From
"Braunstein, Alan"
Date:
<div class="WordSection1"><p class="MsoNormal"><b><u><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Fundamentalissue:</span></u></b><b><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"></span></b><p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">PostgreSQLis different than Oracle in how it
storesBLOBs</span><p class="MsoNormal" style="margin-left:.5in"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"><a
href="http://www.postgresql.org/docs/9.1/static/catalog-pg-largeobject.html">http://www.postgresql.org/docs/9.1/static/catalog-pg-largeobject.html</a>.</span><p
class="MsoNormal"><spanstyle="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span><p
class="MsoNormal"><b><u><spanstyle="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">In PostgreSQL
…</span></u></b><pclass="MsoNormal"><span style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">In
theparticular tables BLOBS are stored as OID’s (unique numbers). </span><p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Thereis one table for all BLOB data (see
pg_largeobjectunder Catalogs/PostgreSQL/pg_largeobject in pgadmin tree). It stores colums “OID/pageno/actual binary
data(page)”.</span><p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span><pclass="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span><pclass="MsoNormal"><b><u><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Whatdo I need?</span></u></b><p
class="MsoNormal"><spanstyle="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">A method of using
pg_dumpto selectively export BLOBs with OID’s used in the tables specified with --table <table_name1> --table
<table_name2></span><pclass="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span><pclass="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Ihave four tables containing BLOBs I want to
exportw/o the BLOB data – that’s easy.</span><p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">WhatI also want is the remaining 200+ tables
exportedwith THEIR BLOB entries, if any, but NOT one BLOB from the four tables explicitly <b><u>not</u></b> specified
inpg_dump command; so JUST the BLOBs associated to any of the 200+ tables I do specify.</span><p
class="MsoNormal"><spanstyle="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span><p
class="MsoNormal"><spanstyle="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span><p
class="MsoNormal"><spanstyle="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Thanks!</span><div
style="mso-element:para-border-div;border:none;border-bottom:solidwindowtext 1.0pt;padding:0in 0in 1.0pt 0in"><p
class="MsoNormal"style="border:none;padding:0in"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Alan</span><pclass="MsoNormal"
style="border:none;padding:0in"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span></div><pclass="MsoNormal"><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green"> </span></div>

Re: Exporting Table-Specified BLOBs Only?

From
"Braunstein, Alan"
Date:

Is any Developer looking at this issue?

 

From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Braunstein, Alan
Sent: Monday, April 28, 2014 1:05 PM
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Exporting Table-Specified BLOBs Only?

 

Fundamental issue:

PostgreSQL is different than Oracle in how it stores BLOBs

http://www.postgresql.org/docs/9.1/static/catalog-pg-largeobject.html.

 

In PostgreSQL …

In the particular tables BLOBS are stored as OID’s (unique numbers).

There is one table for all BLOB data (see pg_largeobject under Catalogs/PostgreSQL/pg_largeobject in pgadmin tree). It stores colums “OID/pageno/actual binary data (page)”.

 

 

What do I need?

A method of using pg_dump to selectively export BLOBs with OID’s used in the tables specified with --table <table_name1> --table <table_name2>

 

I have four tables containing BLOBs I want to export w/o the BLOB data – that’s easy.

What I also want is the remaining 200+ tables exported with THEIR BLOB entries, if any, but NOT one BLOB from the four tables explicitly not specified in pg_dump command; so JUST the BLOBs associated to any of the 200+ tables I do specify.

 

 

Thanks!

Alan

 

 

Re: Exporting Table-Specified BLOBs Only?

From
Guillaume Lelarge
Date:
2014-07-21 18:47 GMT+02:00 Braunstein, Alan <alan_braunstein@mentor.com>:

Is any Developer looking at this issue?


AFAICT, you want a new feature for pg_dump, not from pgAdmin. So you should ask on pgsql-hackers, not pgadmin-support. And I don't think anyone is working on this.
 

 

From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Braunstein, Alan
Sent: Monday, April 28, 2014 1:05 PM
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Exporting Table-Specified BLOBs Only?

 

Fundamental issue:

PostgreSQL is different than Oracle in how it stores BLOBs

http://www.postgresql.org/docs/9.1/static/catalog-pg-largeobject.html.

 

In PostgreSQL …

In the particular tables BLOBS are stored as OID’s (unique numbers).

There is one table for all BLOB data (see pg_largeobject under Catalogs/PostgreSQL/pg_largeobject in pgadmin tree). It stores colums “OID/pageno/actual binary data (page)”.

 

 

What do I need?

A method of using pg_dump to selectively export BLOBs with OID’s used in the tables specified with --table <table_name1> --table <table_name2>

 

I have four tables containing BLOBs I want to export w/o the BLOB data – that’s easy.

What I also want is the remaining 200+ tables exported with THEIR BLOB entries, if any, but NOT one BLOB from the four tables explicitly not specified in pg_dump command; so JUST the BLOBs associated to any of the 200+ tables I do specify.

 

 

Thanks!

Alan

 

 




--