NYCPHP Meetup

NYPHP.org

[nycphp-talk] (no subject)

Matthew Terenzio webmaster at localnotion.com
Sat Nov 20 12:18:24 EST 2004


Assuming a certain php script was the only thing accessing a postgres 
DB.

if I:

  insert into DB;
select from DB to get the current value of a sequence ;

Can I assume I will get the value I'm looking for?
Or might this happen:

insert into DB;
another script instance does an insert;
select brings back second and wrong value for my needs;

  This is really a question of how the PHP engine works, and I am aware 
of different ways of serializing with MySQL, but to my knowledge, those 
methods are not available for Postgres. Enlighten me here as well.

Oh, I do also know this is a great place to create a stored procedure, 
which would atomize it.

Matt




More information about the talk mailing list