Skip site navigation (1) Skip section navigation (2)

Re: How do I get an OID from a record in table?

From: Norberto Meijome <sys(at)meijome(dot)net>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How do I get an OID from a record in table?
Date: 2005-11-29 12:22:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Jaime Casanova wrote:

>On 11/26/05, Scott Simpson <Scott(dot)Simpson(at)computer(dot)org> wrote:
>>If I create a table with an OID field type, how do I set that field type?
>>That is, I have to look up the OID value in another table somewhere to set
>>my OID field and I don't know how to do that. (I'm trying to get one field
>>to point to another record). ADVthanksANCE.
>SELECT oid FROM your_referenced_table;
>oid is an especial field that is present in all row unless you had
>specified WITHOUT OIDS...
>i think in 8.1 WITHOUT OIDS is the DEFAULT...
>it's not a good idea to do what you want to do... use a serial instead
 if one is not specifically using OIDs (as you described above), is 
there any advantage to have tables defined WITH OIDs ? would it be 
better to alter the tables to WITHOUT OID (and then pg_dump and load 
again, i guess)


In response to


pgsql-novice by date

Next:From: George WeaverDate: 2005-11-29 13:30:43
Subject: Re: PGXML support for postgreSQL on Windows
Previous:From: meDate: 2005-11-29 11:19:35
Subject: Re: PostgreSQL 8.0.1-2 WinXP Services

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group