Re: OIDS and its limitations - Mailing list pgsql-general

From Sai Hertz And Control Systems
Subject Re: OIDS and its limitations
Date
Msg-id 40022315.1040002@sancharnet.in
Whole thread Raw
In response to OIDS and its limitations  (Amir Khawaja <amir@gorebels.net>)
List pgsql-general
Hi Amir Khawaja ,

> I have a rather trivial (I hope) question about OID types and
> PostgreSQL. Since PostgreSQL creates tables "WITH OIDS" by default,
> I'm wondering if it is bad practice to allow the default behaviour.
> For example, if I have a database with 60+ tables (all tables have
> their own PK that is not of type OID) and all of them have an OID
> field created by PostgreSQL by default, will this be problematic in
> the long run? For example, if I have 30 tables with records greater
> than 500,000, will PostgreSQL choke?

I have done this in one of  my project which was using OID'S (i.e tables
were created with OIDS nothing more) thus data inserted into the table
of a database  generated new OID's and it was from this list I came to
know that one of the guys table have exausted all the OIDS and to get
around this problem he had to drop recreate the database and again
populate the tables.
 From this point onwards I decided to create Tables WITHOUT OIDS and yes
my aplication is running fine.
This was with PostgreSQL 7.3.x and 7.4.x could not tell about the older one.

Even the documentation (Read Chapter 8 of  SQL language-> data type )
Says  "So, using a user-created table's OID column as a primary key is
discouraged. OIDs are best used only for references to system tables. "


Hope this helps

Regards
Vishal Kashyap

pgsql-general by date:

Previous
From: elein
Date:
Subject: Re: History-based (or logged) database.
Next
From: Anton.Nikiforov@loteco.ru
Date:
Subject: Re: Hierarchical queries