1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

- During dblink_open, if transaction state was IDLE, force cursor count to

initially be 0. This is needed as a previous ABORT might have wiped out
  an automatically opened transaction without maintaining the cursor count.
- Fix regression test expected file for the correct ERROR message, which
  we now get given the above bug fix.
This commit is contained in:
Joe Conway
2006-06-21 16:43:11 +00:00
parent 04c5b69603
commit 1d895f426f
2 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,7 @@
* Darko Prenosil <Darko.Prenosil@finteh.hr>
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
*
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.55 2006/05/30 22:12:12 tgl Exp $
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.56 2006/06/21 16:43:11 joe Exp $
* Copyright (c) 2001-2006, PostgreSQL Global Development Group
* ALL RIGHTS RESERVED;
*
@ -361,6 +361,13 @@ dblink_open(PG_FUNCTION_ARGS)
DBLINK_RES_INTERNALERROR("begin error");
PQclear(res);
rconn->newXactForCursor = TRUE;
/*
* Since transaction state was IDLE, we force cursor count to
* initially be 0. This is needed as a previous ABORT might
* have wiped out our transaction without maintaining the
* cursor count for us.
*/
rconn->openCursorCount = 0;
}
/* if we started a transaction, increment cursor count */