Re: How to perform an identical insert?

From: tony <tony(at)animaproductions(dot)com>
To: Axel Selk <sel(at)biba(dot)uni-bremen(dot)de>
Cc: Postgres mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to perform an identical insert?
Date: 2002-03-22 13:26:11
Message-ID: 1016803571.8667.68.camel@vaio
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2002-03-22 at 14:07, Axel Selk wrote:

> I have collected data in a Microsoft Access data base and I am trying
> now to transfer this data to a postgres data base running on a Linux
> computer. I generated SQL scripts for the structure as well as for the
> data. I have trouble with the data inserts. I want to insert the MS
> Access IDs into Postgres as all references are made to those IDs.
> But I found only the ID serial format in Postgres, which does not accept
> inserted IDs. Is there any way to insert the IDs from Access and then
> using the serial ID for any further action in Postgres?

In the tables put a column old_id which will hold the access ids.

I also used serial to create new ids for the postgresql base and then
did some fancy sql to get everything to coincide...

I still have the old_id column but when the client signs the "good for
service" I'll get rid of them.

Cheers

Tony

--
RedHat Linux on Sony Vaio C1XD/S
http://www.animaproductions.com/linux2.html
Macromedia UltraDev with PostgreSQL
http://www.animaproductions.com/ultra.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2002-03-22 13:35:47 Re: Huge Performance Difference on Similar Query in Pg7.2
Previous Message Heiko Klein 2002-03-22 13:12:24 Re: ODBC problem