Re: Simple search question
От | newsuser@linux2.johnmckown.net (John McKown) |
---|---|
Тема | Re: Simple search question |
Дата | |
Msg-id | slrn8kc501.54l.newsuser@linux2.johnmckown.net обсуждение исходный текст |
Ответ на | Simple search question (Alex <gliathit@ihug.com.au>) |
Список | 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 по дате отправления: