[EMAIL PROTECTED] (ctrl) wrote in message news:<[EMAIL PROTECTED]>...
> I need to copy data that I have on a table in one Postgres database
> into another table, on a different database. The destination table is
> not identical with the source table so I need to do some mapping
> between the 2 tables.
> What would be the best (and quickest) way to transfer the data? (there
> are over 500k rows)
> 
> thanks!

If the 2 tables have different arrangements, then I'm not sure if
there is a quick way. The safest way is probably to do a pg_dump
--attribute-inserts.

>From the pg_dump manpage,

--attribute-inserts

              Dump  data as INSERT commands with explicit column names
(INSERT
              INTO table (column, ...) VALUES ...). This will make
restoration
              very  slow,  but  it is necessary if you desire to
rearrange the
              column ordering.

HTH,
-Tony

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to