From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Slightly bogus regression test for contrib/dblink |
Date: | 2006-06-18 15:35:11 |
Message-ID: | 28544.1150644911@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Lines 509-512 of contrib/dblink/expected/dblink.out read:
-- this should fail because there is no open transaction
SELECT dblink_exec('myconn','DECLARE xact_test CURSOR FOR SELECT * FROM foo');
ERROR: sql error
DETAIL: ERROR: cursor "xact_test" already exists
The error message is not consistent with what the comment claims.
Looking at the test case in total, I think the code is responding
correctly given the rules stated in your last commit message:
2005-10-17 22:55 joe
* contrib/dblink/: dblink.c, expected/dblink.out, sql/dblink.sql:
When a cursor is opened using dblink_open, only start a transaction
if there isn't one already open. Upon dblink_close, only commit the
open transaction if it was started by dblink_open, and only then
when all cursors opened by dblink_open are closed. The transaction
accounting is done individually for all named connections, plus the
persistent unnamed connection.
However, this comment is wrong and so is the preceding one, and I think
maybe you want to alter the test case so it does actually exercise
closing the transaction completely.
BTW, I was led to notice this while examining the current buildfarm
failure report from osprey,
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=osprey&dt=2006-06-17%2004:00:16
It looks to me like the diffs are consistent with the idea that the test
is using a copy of dblink that predates this patch ... do you agree?
If so, anyone have an idea how that could happen? I thought we'd fixed
all the rpath problems, and anyway osprey wasn't failing like this
before today.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2006-06-18 15:36:30 | union all bug? |
Previous Message | Tom Lane | 2006-06-18 15:17:44 | Re: MultiXacts & WAL |