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

Server: Hasura Event on View errors "...is a view. Views cannot have row-level BEFORE or AFTER triggers." #8692

Open
jozef-slezak opened this issue Jul 13, 2022 · 0 comments
Labels
a/eventing/data-triggers c/server Related to server k/bug Something isn't working t/native-dbs

Comments

@jozef-slezak
Copy link

jozef-slezak commented Jul 13, 2022

Version Information

Server Version: v2.8.4-cloud.1

What is the current behaviour?

Hasura displays toast error".is a view. Views cannot have row-level BEFORE or AFTER triggers." from postgres when I try to create event on db view.

What is the expected behaviour?

I can trigger event on certain rows (where condition) by db views or other way.

How to reproduce the issue?

Try to create even for DB view because I want event only certain rows. Hasura displays toast error from postgres.

Screenshots or Screencast

image

Any possible solutions?

Maybe use INSTEAD OF rather then AFTER in create trigger expression.
https://stackoverflow.com/questions/16887884/pl-pgsql-after-insert-trigger-on-a-view-with-a-storages-rule
https://www.postgresql.org/docs/current/sql-createtrigger.html

or add "where condition" to event form (which would be more conveniet for hasura users).

@jozef-slezak jozef-slezak added the k/bug Something isn't working label Jul 13, 2022
@seanparkross seanparkross changed the title Hasura Event on View errors "...is a view. Views cannot have row-level BEFORE or AFTER triggers." Server: Hasura Event on View errors "...is a view. Views cannot have row-level BEFORE or AFTER triggers." Aug 25, 2022
@seanparkross seanparkross added the c/server Related to server label Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/eventing/data-triggers c/server Related to server k/bug Something isn't working t/native-dbs
Projects
None yet
Development

No branches or pull requests

3 participants