From: | "Jim C(dot) Nasby" <decibel(at)decibel(dot)org> |
---|---|
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 16:44:22 |
Message-ID: | 20060511164421.GC99570@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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(dot)derossi(at)email(dot)it 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(at)decibel(dot)org
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?"
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-11 17:28:46 | Re: Fatal: 2149478 (UNCLASSIFIED) |
Previous Message | Joshua D. Drake | 2006-05-11 16:07:27 | Re: Fatal: 2149478 (UNCLASSIFIED) |