Re: oid or without oid ...

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

you mean this:

create table public.test(id serial, ref varchar);

I was using Navicat PostgreSQL, a GUI that does lot of things, I'll
try with the command line ...

thanks !

rai

On 22/05/2007, at 12:08, Sean Davis wrote:

> 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
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message kvnsmnsn 2007-05-22 15:51:25 How Do You Do a Three Way Join?
Previous Message Sean Davis 2007-05-22 10:08:41 Re: oid or without oid ...