Exporting Table-Specified BLOBs Only?
От | Braunstein, Alan |
---|---|
Тема | Exporting Table-Specified BLOBs Only? |
Дата | |
Msg-id | 51EC62B37DBCF043ACF78AEC6EA6B726013DB1BCAC@NA-MBX-03.mgc.mentorg.com обсуждение исходный текст |
Ответы |
Re: Exporting Table-Specified BLOBs Only?
(Robert Haas <robertmhaas@gmail.com>)
|
Список | pgsql-hackers |
<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="border:none;border-bottom:solidwindowtext 1.0pt;padding:0in 0in 1.0pt 0in"><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:green">Alan</span><pclass="MsoNormal"><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>
В списке pgsql-hackers по дате отправления:
Предыдущее
От: Fabrízio de Royes MelloДата:
Сообщение: Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED