madlib-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [madlib] branch master updated: Utilites: Cast quote_literal input to string
Date Thu, 21 Feb 2019 00:27:24 GMT
This is an automated email from the ASF dual-hosted git repository.

riyer pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new d199c4c  Utilites: Cast quote_literal input to string
d199c4c is described below

commit d199c4c0a415d9e5994ca774cdf0b41f19e45cdd
Author: Rahul Iyer <>
AuthorDate: Wed Feb 20 16:25:39 2019 -0800

    Utilites: Cast quote_literal input to string
    JIRA: MADLIB-1302
    plpy.quote_literal expects the input to be a string. This commit ensures
    that the input is cast to a 'str'.
 src/ports/postgres/modules/internal/db_utils.py_in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ports/postgres/modules/internal/db_utils.py_in b/src/ports/postgres/modules/internal/db_utils.py_in
index 45477ef..37700a8 100644
--- a/src/ports/postgres/modules/internal/db_utils.py_in
+++ b/src/ports/postgres/modules/internal/db_utils.py_in
@@ -72,7 +72,7 @@ def quote_literal(input_str):
         function, forwards the argument to plpy.quote_literal.
-        return plpy.quote_literal(input_str)
+        return plpy.quote_literal(str(input_str))
     except AttributeError:
         # plpy.quote_literal is not supported, we work around by returning
         # dollar-quoted string with obscure tag

View raw message