Re: trobles in importing dbf file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BTW, your email almost got marked as spam:

X-Spam-Status: No, score=4.1 required=5.0 tests=BAYES_00,DNS_FROM_RFC_ABUSE,                    
        NO_REAL_NAME,RCVD_HELO_IP_MISMATCH,RCVD_NUMERIC_HELO
        autolearn=no version=3.1.0  

On Thu, May 11, 2006 at 09:24:35AM +0200, giuseppe.derossi@xxxxxxxx wrote:
> 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

It's Postgres or PostgreSQL, not Postgree.

> 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.

ALTER TABLE tablename ADD PRIMARY KEY (field1, field2);
or
ALTER TABLE tablename ADD UNIQUE (field1, field2);
-- 
Jim C. Nasby, Database Architect                decibel@xxxxxxxxxxx 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux