Re: oid or without oid ... - Mailing list pgsql-novice

From Sean Davis
Subject Re: oid or without oid ...
Date
Msg-id 200705220557.10023.sdavis2@mail.nih.gov
Whole thread Raw
In response to oid or without oid ...  (Raimon Fernandez <coder@montx.com>)
Responses Re: oid or without oid ...
List pgsql-novice
On Tuesday 22 May 2007 03:30, Raimon Fernandez wrote:
> Hello again,
>
>
> In my previous databases development, I've been using always a unique
> longint number for identifying each record.
>
> In PostgreSQL I can see that it has the oid, he can do it for you.
>
> Also I see that is an optional parameter, and after surfing the web,
> I could find some people that say never use them, an another ones
> that you can use it ...
>
> Any extra advice would be perfectly before creating the database, if
> it's better for now and future to use oid or simply create an id
> field as a serial or something similar.

In general, the recommendation is not to use OIDs.  Use serial columns (or
some other primary key) instead.

Sean

pgsql-novice by date:

Previous
From: Raimon Fernandez
Date:
Subject: oid or without oid ...
Next
From: Raimon Fernandez
Date:
Subject: Re: oid or without oid ...