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

Re: Postgres Access Timing

On Thu, Jul 23, 2009 at 2:15 AM, beamends <..hidden..> wrote:
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

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

Hmmm....  I don't think it would be a timing issue unless you are doing strange things.  Do you have errors from the PostgreSQL log file?

Best Wishes,
Chris Travers