Thread: default_with_oid

default_with_oid

From
"Freddy Villalba Arias"
Date:

Hello,

 

I’ve noticed that whenever I create a table, the DBMS is adding an OID column without my consent. I’ve also read that this behaviour can be modified (disabled) by setting the default_with_oid (to false, I suppose).

 

What is the OID column for? How (and where) can I find (and disable) the default_with_oid flag?

 

Then, a less important question for pgAdmin3 users: is it possible to manage (select / insert / update / delete) the system’s tables with this tool?

 

Regards,

Freddy.

Re: default_with_oid

From
Dave Cramer
Date:
oid's are not necessary for the table, just create the table without
oid's

oids are used by the system tables to reference each other.

ie create table foo ( id int ) without oids;
Dave
On Mon, 2004-04-26 at 11:07, Freddy Villalba Arias wrote:
> Hello,
>
>
>
> I’ve noticed that whenever I create a table, the DBMS is adding an OID
> column without my consent. I’ve also read that this behaviour can be
> modified (disabled) by setting the default_with_oid (to false, I
> suppose).
>
>
>
> What is the OID column for? How (and where) can I find (and disable)
> the default_with_oid flag?
>
>
>
> Then, a less important question for pgAdmin3 users: is it possible to
> manage (select / insert / update / delete) the system’s tables with
> this tool?
>
>
>
> Regards,
>
> Freddy.
>
>
> !DSPAM:408d2aac66071710736892!
--
Dave Cramer
519 939 0336
ICQ # 14675561


Re: default_with_oid

From
Bruce Momjian
Date:
Freddy Villalba Arias wrote:
> Hello,
>
>
>
> I've noticed that whenever I create a table, the DBMS is adding an OID
> column without my consent. I've also read that this behaviour can be
> modified (disabled) by setting the default_with_oid (to false, I
> suppose).

That option is only available in 7.5.  In earlier releases, you have to
create WITH OIDS or alter the table to now have oids.

> What is the OID column for? How (and where) can I find (and disable) the
> default_with_oid flag?

There is a flag only in 7.5, which will not be released for several
months.

The column gives a unique value to each row.  Try SELECT oid FROM tab.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073