Thread: EXPORT / IMPORT

EXPORT / IMPORT

From
"Freddy Villalba Arias"
Date:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">Hello,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Is there a simple way to generate an export / import script in PostgreSQL (i.e. a script that
containsINSERT statements for every row in a table) ???</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanlang="EN-GB" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">COPY is NOT a good option (personal opinion).</span></font><p class="MsoNormal"><font
face="Arial"size="2"><span lang="EN-GB" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">I’m using pgAdmin3 but it does not offer this (quite disappointing, may I
say).</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Thanx,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Freddy.</span></font></div>

Re: EXPORT / IMPORT

From
Jerome Alet
Date:
On Fri, May 07, 2004 at 10:20:52AM +0200, Freddy Villalba Arias wrote:
> 
> Is there a simple way to generate an export / import script in
> PostgreSQL (i.e. a script that contains INSERT statements for every row
> in a table) ???

pg_dump

bye

Jerome Alet


Re: EXPORT / IMPORT

From
Andrew Sullivan
Date:
On Fri, May 07, 2004 at 10:20:52AM +0200, Freddy Villalba Arias wrote:
> 
> Is there a simple way to generate an export / import script in
> PostgreSQL (i.e. a script that contains INSERT statements for every row
> in a table) ???
> 
> COPY is NOT a good option (personal opinion).

pg_dump -d or -D.  Note that restoring from this is going to be a
whole lot slower than restoring from a COPY based dump.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca