Skip site navigation (1) Skip section navigation (2)

Re: 7.3.x data migration to 7.4.x - inelegant solution

From: <operationsengineer1(at)yahoo(dot)com>
To: operationsengineer1(at)yahoo(dot)com,PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: 7.3.x data migration to 7.4.x - inelegant solution
Date: 2005-09-13 19:35:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
--- operationsengineer1(at)yahoo(dot)com wrote:

> phppgadmin (my only access to db - cheesy webhost)
> has
> an "export" link that only allows me to...
> export data, structure or data and structure (fine
> so
> far, i want data only).
> format options are "copy" and "sql".
> i can also check "oid" and/or "drop", but i don't
> think either apply to my case since i don't use oids
> as primary keys.
> i can download the data or i can download a
> compressed
> copy of the data.
> i tried data only and downloaded with the sql
> options.
> i plugged this into pgadmin's query view and ran it.
> unfortunately, the sql doesn't list the column names
> in the insert statements...  and my columns are not
> all in the same order!  so close...  yet still so
> far....
> is there anything i can do here?  i don't think
> pgadmin allows me to reorder columns.  therefore, i
> don't like that approach (deleting and recreating a
> lot of columns and handling all the contrainsts,
> etc...).
> i don't fully understand how to restore the output
> of
> the "copy" option.  when i try and restore something
> in pgadmin3, it is looking for a file with extension
> *.backup.  i don't think phppgadmin (as set up on
> cheesy webhost) allows me to create this type of
> file.
> any guidance would be appreciated - as always.

my solution, albeit not a nice one - but it works, is
to "export table "data only" with the SQL option in

i then open it up in OOo writer, to a search and
replace and replace "VALUES" with "(list of columns in
column order) VALUES"

i then paste it into pgadmin's query view, deleate the
notes and extraneous text and run it.

of course, you have to know your relations b/c you
likely won't be allowed to break foreign key

ugly, yes.  effective, yes.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

In response to

pgsql-novice by date

Next:From: Michael SwierczekDate: 2005-09-13 20:27:54
Subject: question regarding contrib/tablefunc
Previous:From: Tom LaneDate: 2005-09-13 18:39:29
Subject: Re: Joining a series of dates

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group