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@xxxxxxxxxxxxxx [mailto:pgsql-admin- > owner@xxxxxxxxxxxxxx] On Behalf Of giuseppe.derossi@xxxxxxxx > Sent: 11 May 2006 8:25 am > To: pgsql-admin@xxxxxxxxxxxxxx > 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! >