From: | ctrl(at)altonsys(dot)com (ctrl) |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: best method to copy data across databases |
Date: | 2004-07-03 18:19:50 |
Message-ID: | 46a31c4d.0407031019.78b04fdb@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Many thanks Tony and Tom,
since this was a "one time" process speed wasn't an issue...
I just did a plain pg_dump with insert and explicit column names in
the dump, then used vi to rename the columns and get rid of some of
them...
non very scientific but it worked :)
cheers.
tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote in message news:<14059(dot)1088777527(at)sss(dot)pgh(dot)pa(dot)us>...
> reina_ga(at)hotmail(dot)com (Tony Reina) writes:
> > 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.
>
> In recent versions (definitely 7.4, don't remember about 7.3),
> pg_dump will include a column list in its COPY commands, so a
> plain pg_dump should work. The way with COPY will be a good bit
> faster than a pile of INSERT commands.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
From | Date | Subject | |
---|---|---|---|
Next Message | Dario V. Fassi | 2004-07-03 18:39:59 | Re: [JDBC] Error in DatabaseMetaData.getColumns() with Views |
Previous Message | Dario V. Fassi | 2004-07-03 17:06:55 | Re: Error in DatabaseMetaData.getColumns() with Views |