projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34f4a43
)
handlers.dispatch: in case of part-func, apply master grants later
author
Marko Kreen
<markokr@gmail.com>
Thu, 29 Dec 2011 14:25:32 +0000
(16:25 +0200)
committer
Marko Kreen
<markokr@gmail.com>
Thu, 29 Dec 2011 14:25:32 +0000
(16:25 +0200)
the problem is there is no good way to do it with plpgsql.
python/londiste/handlers/dispatch.py
patch
|
blob
|
blame
|
history
diff --git
a/python/londiste/handlers/dispatch.py
b/python/londiste/handlers/dispatch.py
index 95d08e726e0c5f2cf10ed60b0d6fb5ec3fc8c5f9..8954d2bfeb4fdb0817040ec7b843f0ee8dadf781 100644
(file)
--- a/
python/londiste/handlers/dispatch.py
+++ b/
python/londiste/handlers/dispatch.py
@@
-886,6
+886,10
@@
class Dispatcher(BaseHandler):
if skytools.exists_function(curs, self.conf.part_func, len(PART_FUNC_ARGS)):
self.log.debug('check_part.exec: func:%s, args: %s' % (pfcall, vals))
curs.execute(pfcall, vals)
+
+ # load grants from master table
+ struct = TableStruct(curs, self.dest_table)
+ struct.create(curs, T_GRANT, dst)
else:
self.log.debug('part func %s not found, cloning table' % self.conf.part_func)
struct = TableStruct(curs, self.dest_table)