diff options
author | Irina Truong <i.chernyavska@gmail.com> | 2018-06-16 14:54:52 -0700 |
---|---|---|
committer | Irina Truong <i.chernyavska@gmail.com> | 2018-06-16 21:49:28 -0700 |
commit | 8ee20aa82ebf4600117820f03cbe2453abae84ae (patch) | |
tree | fe3b398fe0f195aeb6593238d2a75d6d2ef2703c | |
parent | 7812a7bad7370283cd6bfccf25d3a02c6bbb6e5b (diff) |
Fix for 'only named arguments may follow *expression'
-rw-r--r-- | pgcli/pgexecute.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pgcli/pgexecute.py b/pgcli/pgexecute.py index ba5e8123..04baa1fc 100644 --- a/pgcli/pgexecute.py +++ b/pgcli/pgexecute.py @@ -410,7 +410,7 @@ class PGExecute(object): template = 'CREATE OR REPLACE {6} VIEW {0}.{1} AS \n{3}' # 2: relkind, v or m (materialized) - # 4: reloptions, null + # 4: reloptions, null # 5: checkoption: local or cascaded with self.conn.cursor() as cur: sql = self.view_definition_query @@ -422,7 +422,7 @@ class PGExecute(object): raise RuntimeError('View {} does not exist.'.format(spec)) result = cur.fetchone() view_type = 'MATERIALIZED' if result[2] == 'm' else '' - return template.format(*result, view_type) + return template.format(*result + [view_type]) def function_definition(self, spec): """Returns the SQL defining functions described by `spec` """ |