Thread: 7.3.x (phppgadmin) data migration to 7.4.x (pgadmin3) issue

7.3.x (phppgadmin) data migration to 7.4.x (pgadmin3) issue

From
Date:
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.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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

From
Date:
--- operationsengineer1@yahoo.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
7.3.x.

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
constrainsts.

ugly, yes.  effective, yes.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com