diff -r af637235ca81 -r 8c7f0a51ba50 schemadiff.py --- a/schemadiff.py Thu Jan 31 11:02:04 2013 +0100 +++ b/schemadiff.py Thu Jan 31 13:24:57 2013 +0100 @@ -15,7 +15,9 @@ self.parser.add_argument('-s', dest='schema', nargs='*', help='Schema filter') self.parser.add_argument('-t', dest='table', nargs='*', help='Table filter') + self.parser.add_argument('-f', dest='function', type=str, help='Function filter (regex)') self.parser.add_argument('--sql', action='store_true', help='Output is SQL script.') + self.parser.add_argument('--body', action='store_true', help='Output diff for function bodies.') self.init() @@ -28,9 +30,12 @@ try: if self.args.schema: pgd.filter_schemas(include=self.args.schema) - if self.args.table: pgd.filter_tables(include=self.args.table) + if self.args.function: + pgd.filter_functions(self.args.function) + if self.args.body: + pgd.function_body_diff = True if self.args.sql: pgd.print_patch()