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

Поиск
Список
Период
Сортировка
От Norberto Meijome
Тема Re: How do I get an OID from a record in table?
Дата
Msg-id 438C480C.4080905@meijome.net
обсуждение исходный текст
Ответ на Re: How do I get an OID from a record in table?  (Jaime Casanova <systemguards@gmail.com>)
Ответы Re: How do I get an OID from a record in table?  (Jaime Casanova <systemguards@gmail.com>)
Список pgsql-novice
Jaime Casanova wrote:
On 11/26/05, Scott Simpson <Scott.Simpson@computer.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
 
Jaime,
 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)

thanks!
Beto

В списке pgsql-novice по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: PostgreSQL 8.0.1-2 WinXP Services
Следующее
От: George Weaver
Дата:
Сообщение: Re: PGXML support for postgreSQL on Windows