Daniel Andersen <zedar(at)free2air(dot)com(dot)au> writes:
> Hrm i probably should have fixed up that earlier mistake in my code before
> copying and pasting. The pgres_tuples_ok thing is irrelevant,the printed
> results show pgres_command_ok is being returned, so as i said things should
> theoretically be ok. But they aren't. The query is not being executed
> correctly as the database is remaining unmodified, despite the query saying
> it has updated one row (the expected result).
If the backend says it updated one row, then I'm reasonably confident
that it updated one row. I'll bet your problem is that you're not
committing the transaction (eg, you issued BEGIN but no COMMIT).
In that case, the updated row never becomes visible outside your own
> If i copy the query word for
> word into the psql database interface, it is executed perfectly and update
> the one record as it should.
This pretty much exonerates both the backend and libpq, seeing as how
psql is just an application built on top of libpq. Time to start
looking at your own application logic.
regards, tom lane
In response to
pgsql-interfaces by date
|Next:||From: David Joyner||Date: 2002-01-09 14:01:33|
|Subject: libpq++ |
|Previous:||From: Daniel Andersen||Date: 2002-01-07 23:44:21|
|Subject: Re: libpq doing strange things|