Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with subscriptions trigger in older Postgres versions #241

Merged
merged 3 commits into from
Aug 26, 2021

Conversation

slashdotdash
Copy link
Member

@slashdotdash slashdotdash commented Jul 10, 2021

The notify_events events function which is triggered after an INSERT or UPDATE to the streams table was accessing the OLD variable which is only available for an UPDATE trigger. This problem only occurs with older versions of Postgres (e.g. 9, 10).

This pull request fixes the trigger so that it is compatible with all support Postgres versions. A database migration has been added to upgrade and fix any existing event store databases.

Closes #240.

@slashdotdash slashdotdash force-pushed the bug/postgres-trigger branch 2 times, most recently from 128f410 to f6b23c4 Compare July 10, 2021 16:39
Remove Elixir v1.11.4 from GitHub Actions workflow as the formatting check fails
@slashdotdash slashdotdash force-pushed the bug/postgres-trigger branch from f6b23c4 to 56e4fb7 Compare July 11, 2021 14:41
@slashdotdash slashdotdash merged commit bed9a4b into master Aug 26, 2021
@slashdotdash slashdotdash deleted the bug/postgres-trigger branch August 26, 2021 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Match Error Between event_store and Postgrex.Error
1 participant