From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Daniel Andersen <zedar(at)free2air(dot)com(dot)au> |
Cc: | Postgres Interface List <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: libpq doing strange things |
Date: | 2002-01-08 00:32:42 |
Message-ID: | 15369.1010449962@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
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
transaction.
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | David Joyner | 2002-01-09 14:01:33 | libpq++ |
Previous Message | Daniel Andersen | 2002-01-07 23:44:21 | Re: libpq doing strange things |