Patch to fix search_path defencies with pg_bench - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Patch to fix search_path defencies with pg_bench
Date
Msg-id 1241561064.4278.13.camel@jd-laptop.pragmaticzealot.org
Whole thread Raw
Responses Re: Patch to fix search_path defencies with pg_bench  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Patch to fix search_path defencies with pg_bench  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@jabber.postgresql.org  Consulting, Development, Support, Training  503-667-4564 -
http://www.commandprompt.com/ The PostgreSQL Company, serving since 1997
 



pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Serializable Isolation without blocking
Next
From: Josh Berkus
Date:
Subject: Re: Wrong stats for empty tables