Patch to fix search_path defencies with pg_bench

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Patch to fix search_path defencies with pg_bench
Date: 2009-05-05 22:04:24
Message-ID: 1241561064.4278.13.camel@jd-laptop.pragmaticzealot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I have been doing some testing with pgbench and I realized that it
forces the use of public as its search_path. This is bad if:

* You want to run multiple pgbench instances within the same database
* You don't want to use public (for whatever reason)

This patch removes that ability and thus will defer to the default
search_path for the connecting user.

diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index ad20cac..1f25921 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -357,8 +357,6 @@ doConnect(void)
return NULL;
}

- executeStatement(conn, "SET search_path = public");
-
return conn;
}

--
PostgreSQL - XMPP: jdrake(at)jabber(dot)postgresql(dot)org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-05-05 22:10:06 Re: Wrong stats for empty tables
Previous Message Neil Conway 2009-05-05 22:01:43 Re: Serializable Isolation without blocking