[Pgpool-general] select in transactions

Christopher Gorge Marges christophergorge at gmail.com
Thu Sep 27 04:47:00 UTC 2007


I would like to ask if any statement can see the affected rows from previous
statements in pgpool.  We have transactions that depend on the inserted row
(generated ids for example).

BEGIN
INSERT INTO employee(lastname, firstname) values ('marges', 'christopher');
SELECT id FROM employee WHERE lastname = 'marges' AND firstname =
'christopher';
INSERT INTO salary (empid, bracket) VALUES (id, '1000'); <--- need to get
emp id from above
END;


In pgpool-II a select inside a transaction does not see the inserted rows.

(example from pgpool-II doc)

BEGIN;
INSERT INTO t(a) VALUES (1);
SELECT * FROM t ORDER BY a; <-- INSERT above is not visible from this SELECT
statement
END;

If the behavior is the same in pgpool then I'm afraid the transations we
have wont work anymore.


Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgpool-general/attachments/20070927/15f93030/attachment.html 


More information about the Pgpool-general mailing list