[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Postgres Access Timing



Hi All,
not strictly a LSMB thing, but as the answer may be of interest to
others here goes... (excuse the terminology, I'm not of the dbase expert
persuasion)


I'm "injecting" data into Postgres using a C program via libpq. From the
documentation it's not clear if the various functions check/wait to see
if a dbase command has been or can be completed before returning from
the function ("locking"?). All is tickety-boo except when creating a new
part. When the new part is created the next line is to create the
partsvendor table entry. This works ok for most of the time, but will
start failing after a while with the INSERT into partsvendor failing.
Doing the command from the SQL window in phppgadmin will then work.
Presumably this is a timing issue or such. So the question is, is there
and SQL or Posgres command to interrogate the dbase to see if it is
"ready" for the next command. Or am I barking up the wrong tree
entirely! 

Cheers
Richard