# HG changeset patch # User Catherine Devlin # Date 1290262911 18000 # Node ID 0b83bc94a1a1d3088ffb107d54e096c0997a73b4 # Parent 4ec9438c003613ddf0edea9d6f3c29d5c1c7a8d5 accept suffix on SHOW PARAM also diff -r 4ec9438c0036 -r 0b83bc94a1a1 sqlpython/connections.py --- a/sqlpython/connections.py Sat Nov 20 09:16:18 2010 -0500 +++ b/sqlpython/connections.py Sat Nov 20 09:21:51 2010 -0500 @@ -332,7 +332,7 @@ AND table_type %(type_op)s UPPER(%(type)S) AND table_name %(name_op)s LOWER(%(name)S) ORDER BY table_schema, table_type, table_name %(sort_direction)s""" - parameter_qry = """SHOW variables LIKE '%%%s%%'%s""" + parameter_qry = """SHOW variables LIKE '%%%s%%'%s%s""" gerald_types = {'TABLE': gerald.mysql_schema.Table, 'VIEW': gerald.mysql_schema.View, 'BASE TABLE': gerald.mysql_schema.Table, @@ -377,7 +377,7 @@ FROM information_schema.routines r WHERE ( (r.routine_schema %(owner_op)s LOWER(%(owner)S)) OR (r.routine_schema = 'public') ) AND LOWER(r.routine_definition) LIKE %(text)S""" - parameter_qry = """SELECT name, unit, setting FROM pg_settings WHERE name LIKE LOWER('%%%s%%')%s""" + parameter_qry = """SELECT name, unit, setting FROM pg_settings WHERE name LIKE LOWER('%%%s%%')%s%s""" gerald_types = {'BASE TABLE': gerald.postgres_schema.Table, 'VIEW': gerald.postgres_schema.View} @@ -447,7 +447,7 @@ WHEN 6 THEN 'BIG INTEGER' END type, value FROM v$parameter - WHERE name LIKE LOWER('%%%s%%')%s""" + WHERE name LIKE LOWER('%%%s%%')%s%s""" def source(self, target, opts): return self._source(target, opts) def bindSyntax(self, varname): diff -r 4ec9438c0036 -r 0b83bc94a1a1 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Sat Nov 20 09:16:18 2010 -0500 +++ b/sqlpython/sqlpyPlus.py Sat Nov 20 09:21:51 2010 -0500 @@ -908,7 +908,7 @@ def _param_select(self, arg, seekme): seekme = seekme.replace('*','%').replace('?','_') - query = self.parsed(self.current_instance.parameter_qry % (seekme, arg.parsed.terminator or ';')) + query = self.parsed(self.current_instance.parameter_qry % (seekme, arg.parsed.terminator or ';', arg.parsed.suffix)) return self.do_select(query) def do_show(self, arg):