Hi all,
Forgot to attach the file prepare.c with steps for the bug.

Here is the file attached.

- Nachiket
#include <stdlib.h>
#include <stdio.h>
#include "libpq-fe.h"

int
main()
{
	PGconn *conn;
	PGresult *res;

	conn = PQconnectdb("host=localhost dbname=postgres");
	if (PQstatus(conn) != CONNECTION_OK)
	{
		exit(1);
	}

	PQexec(conn, "BEGIN");

	res = PQexec(conn, "SELECT pg_backend_pid()");
	printf("pid: %s\n", PQgetvalue(res, 0, 0));
	sleep(10);

	PQexec(conn, "set search_path=public");
	PQexec(conn, "SELECT 1/0");

	printf("now rolling back\n");

	res = PQprepare(conn, "bar", "ROLLBACK", 0, NULL);

	PQfinish(conn);
}
-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to