From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | Mike Gould <mgould(at)allcoast(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SERIAL and Primary Key |
Date: | 2008-02-29 20:56:43 |
Message-ID: | 20080229205643.GA11301@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Feb 29, 2008 at 03:28:11PM -0500, Mike Gould wrote:
> CREATE TABLE "fav5"."batchnumber" (
> "batchnumberid" SERIAL NOT NULL,
> "processtype" SMALLINT NOT NULL,
> "termloc" CHAR(3) NOT NULL,
> "batchno" INTEGER NOT NULL
> ) WITHOUT OIDS;
> With the above table definition, is batchnumberid by default also defined as the primary key or do I still need to define a separate Primary Key constraint?
wouldn't it be faster to simply try it?
it will be just a simple column. you have to add primary key
separately.
depesz
--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)
From | Date | Subject | |
---|---|---|---|
Next Message | fredj132 | 2008-02-29 21:01:02 | Problems making client perl connection to postgres server |
Previous Message | Erik Jones | 2008-02-29 20:55:28 | Re: SERIAL and Primary Key |