Re: trobles in importing dbf file

From: "Andy Shellam" <andy(dot)shellam(at)mailnetwork(dot)co(dot)uk>
To: <giuseppe(dot)derossi(at)email(dot)it>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: trobles in importing dbf file
Date: 2006-05-11 07:29:29
Message-ID: !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAAC4AAAAAAAAAt+qV6pqKPEmXG74TlFgX5gEAlpDSN+DrMEWnumhoRHpQKQAAAbLc9wAAEAAAAGOmWcqRiGhCjc5JUAapeswBAAAAAA==@mailnetwork.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

You can create a column in your destination table with a data type of
"serial" which will be an auto-incrementing number with every inserted row.
Or if you create the table with "WITH OIDS", PostgreSQL will add an internal
object ID.

The above will take care of your unique primary key.

Andy

> -----Original Message-----
> From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-
> owner(at)postgresql(dot)org] On Behalf Of giuseppe(dot)derossi(at)email(dot)it
> Sent: 11 May 2006 8:25 am
> To: pgsql-admin(at)postgresql(dot)org
> Subject: [ADMIN] trobles in importing dbf file
>
> Hi Guys,
> I'm a newbie in Postgres and hope my mail is not off topic. Well, I'm
> migrating from Mysql to PostGree in order to use the postgis features.
> I've
> some dbf files I've to import, so I've used the utility dbf2pg.exe ( I've
> installed the version 8.1 in win xp env). Now is there a way to add
> automatically a primary key if no, how
> can I can add it after importing the table in postgres ? In mYsql an index
> (the number or row) is automatically added as first column.
> Sorry if the question is trivial, I didn't suspect this gap.
> Is there a standard proceure to import a database mapped in a lot of dbf
> files.
>
>
>
>
> Thanks in advantage
>
> --
> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
> Sponsor:
> Partecipa al concorso Best Western, ogni giorno puoi vincere un
> fantastico
> week end da sogno!
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5096&d=20060511
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
> !DSPAM:14,4462e6f834491668112969!
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message sandhya 2006-05-11 07:44:20 Re: regarding image files in DB
Previous Message Andy Shellam 2006-05-11 07:26:57 Re: regarding image files in DB