OID question

From: Jacques Huard <jacques(at)intuineer(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: OID question
Date: 2000-06-01 22:29:16
Message-ID: 3936E378.9FBE1EF2@intuineer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have used MySQL to do several database related things in the past
using PHP. In the past I have used a field "row_id" as a unique number
(within that specific table) as a reference to a specific row. This
"row_id" field was automatically placed in a table when it was created
in MySQL and the next unique number was placed in the field when
automatically during every new insert. This made things easy for
writing applications in PHP. When I switch to Postgres I noticed that
there was a OID. I believe that this "object identifier" is similar to
the "row_id" in MySQL but I am unable to access it for an given row.
PHP has a function which can get the last OID for the last "Insert"
issued, however, this won't help me accomplish the same things I was
able to accomplish using "row_id" in MySQL. I have read the
documetation and have not found a real good description of OID but have
found commands that can add a unique sequence column which could
accomplish what I need. However, I need (or want) the unique sequence
column to maintain itself, without calling a function to fill in that
field during an insert. I am sure there is an easy way to accomplish
this and I am overlooking the solution. Could someone suggest what they
have done? Thanks for any response.

Jacques Huard
jacques(at)_no_spam_intuineer(dot)com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Keith Parks 2000-06-01 22:32:13 Re: Problems with recent CVS versions and Solaris.
Previous Message Bruce Momjian 2000-06-01 22:23:18 Re: [HACKERS] Re: INET operators and NOT