You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by ri...@apache.org on 2017/01/13 18:45:28 UTC

[2/2] incubator-madlib git commit: Madpack: Disable psqlrc when executing queries

Madpack: Disable psqlrc when executing queries

JIRA: MADLIB-1053


Project: http://git-wip-us.apache.org/repos/asf/incubator-madlib/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-madlib/commit/e0439ed8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-madlib/tree/e0439ed8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-madlib/diff/e0439ed8

Branch: refs/heads/master
Commit: e0439ed8d715c4a72dfbf2e450f7467925bf8784
Parents: c564e31
Author: Rahul Iyer <ri...@apache.org>
Authored: Fri Jan 13 10:37:22 2017 -0800
Committer: Rahul Iyer <ri...@apache.org>
Committed: Fri Jan 13 10:37:22 2017 -0800

----------------------------------------------------------------------
 src/madpack/madpack.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/e0439ed8/src/madpack/madpack.py
----------------------------------------------------------------------
diff --git a/src/madpack/madpack.py b/src/madpack/madpack.py
index e08c1c0..6348899 100755
--- a/src/madpack/madpack.py
+++ b/src/madpack/madpack.py
@@ -127,11 +127,13 @@ def run_query(sql, show_error, con_args=con_args):
               '-U', con_args['user'],
               '-F', delimiter,
               '--no-password',
-              '-Ac', "set CLIENT_MIN_MESSAGES=error; " + sql]
+              '--no-psqlrc',
+              '--no-align',
+              '-c', sql]
     runenv = os.environ
     if 'password' in con_args:
         runenv["PGPASSWORD"] = con_args['password']
-    runenv["PGOPTIONS"] = '-c search_path=public -c client_min_messages=notice'
+    runenv["PGOPTIONS"] = '-c search_path=public -c client_min_messages=error'
     std, err = subprocess.Popen(runcmd, env=runenv, stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE).communicate()