Skip to content

Commit

Permalink
Merge pull request #12 from ZeroCater/h/bug-fix
Browse files Browse the repository at this point in the history
Fixing issue with search_path
  • Loading branch information
hamedahmadi authored Jul 24, 2017
2 parents ddec712 + 020f4c4 commit 3ab3289
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pg_events/core/schemas/triggers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ BEGIN
AND table_name NOT LIKE '\_%'
LOOP
command := format(
'SET search_path TO %s; ' ||
'DROP TRIGGER IF EXISTS %s ON %s; ' ||
'CREATE TRIGGER %2$s AFTER INSERT OR UPDATE OR DELETE ON %3$s FOR EACH ROW EXECUTE PROCEDURE pgevents_data_update_notify();',
quote_ident(rec.table_schema),
'CREATE TRIGGER %1$s AFTER INSERT OR UPDATE OR DELETE ON %2$s FOR EACH ROW EXECUTE PROCEDURE pgevents_data_update_notify();',
format('pgevents_%s__%s', quote_ident(rec.table_schema), quote_ident(rec.table_name)),
quote_ident(rec.table_name)
format('%s.%s', quote_ident(rec.table_schema), quote_ident(rec.table_name))
);
EXECUTE command;
RETURN NEXT command;
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

setup(
name='pg_events',
version='0.1.5',
version='0.1.6',
description="Postgres events",
long_description='',
keywords='postgres python django trigger listen notify events heroku connect',
author='ZeroCater',
author_email='tech@zerocater.com',
url='https://github.com/ZeroCater/pg_events',
download_url='https://github.com/ZeroCater/pg_events/tarball/0.1.5',
download_url='https://github.com/ZeroCater/pg_events/tarball/0.1.6',
license='MIT',
packages=setuptools.find_packages(),
package_data={'pg_events': ['core/schemas/*.sql']},
Expand Down

0 comments on commit 3ab3289

Please sign in to comment.