Re: oid or without oid ...

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Raimon Fernandez <coder(at)montx(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: oid or without oid ...
Date: 2007-05-22 10:08:41
Message-ID: 200705220608.41284.sdavis2@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tuesday 22 May 2007 06:05, Raimon Fernandez wrote:
> I'm trying with this approach:
>
> create table public.articles( "id" int4 not null default nextval
> ('articles_id_seq'::regclass) , "referencia" varchar not null
> )
> WITHOUT OIDS;
> ALTER table "public"."articles" OWNER TO "postgres";
> ALTER table "public"."articles" SET WITHOUT CLUSTER;
> alter table "public"."articles" add primary key(id);

And keep in mind that you can use:

id serial

as a shorthand.

Sean

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Raimon Fernandez 2007-05-22 10:17:27 Re: oid or without oid ...
Previous Message Raimon Fernandez 2007-05-22 10:05:46 Re: oid or without oid ...