Re: Simple search question - Mailing list pgsql-sql

From newsuser@linux2.johnmckown.net (John McKown)
Subject Re: Simple search question
Date
Msg-id slrn8kc501.54l.newsuser@linux2.johnmckown.net
Whole thread Raw
In response to Simple search question  (Alex <gliathit@ihug.com.au>)
List pgsql-sql
On Tue, 13 Jun 2000 12:15:17 +1000, Alex <gliathit@ihug.com.au> wrote:[snip]
>
>> so I can't test this. If it doesn't work, I'd try using pg_GetLastOid()
>> to get the OID of the inserted row. The use the pg_Exec and SELECT
>> * WHERE OID=oid-value, followed by pg_fetch_row().
>
>Thanks John, and the other person that replied to my email (I know it is a
>bit of a stupid question, but in such an unpopulated list, I don't think
>there's any reason to post privately).
> This leads to another question. If someone adds another row during this,
>what will happen?

From what I can tell, the function pg_GetLastOid() does not do a database
query. It appears that it simply fetches a value which was returned by
PostgreSQL during the pg_Exec() call. Therefore, there should not be any
problem with another, concurrent, execution of this PHP script. The
pg_GetLastOid() is really more of pg_GetLastOid_of_this_execution, not
"global" to the database (not GetLastOid_of_the_entire_database).


pgsql-sql by date:

Previous
From: JanWieck@t-online.de (Jan Wieck)
Date:
Subject: Re: sql foregein key
Next
From:
Date:
Subject: dump from access to pg on linux