"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> The lack of regression tests covering this area is a bit annoying
> at this point. However, it's hard to see how to test FOR UPDATE
> until we get some concurrent-sessions support in psql.
Well, end-to-end testing would e better but we can test that the locks are
at least being recorded by white-box inspection:
postgres=# begin;
BEGIN
postgres=# select * from tellers for share;tid | bid | tbalance | filler
-----+-----+----------+-------- 1 | 1 | 0 | 2 | 1 | 0 | 3 | 1 | 0 | 4 | 1 |
0| 5 | 1 | 0 | 6 | 1 | 0 | 7 | 1 | 0 | 8 | 1 | 0 | 9 | 1 | 0 |
10| 1 | 0 |
(10 rows)
postgres=# select distinct age(xmax) from tellers;age
----- 0
(1 row)
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services!