-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Insert with Generated Columns #3572
Comments
This seems like it's probably caused by the same issue as in #2508. |
I expect so, yes. Edit : verified this works on my branch. |
I'm confused how @go4cas got this to work even over Graphql. I have a table with generated column but when I try to insert an object over Graphql API (and not pass anything for that generated column), I get a Postgres error. Looking at the error message, you can see that Hasura has taken the liberty of adding all columns to the attempted INSERT command, filling in defaults where I didn't pass values. This break the generated column of course. When I use the Graphiql interface in the console however, it works fine, no errors and the generated column is returned as expected. Does Hasura make different INSERT commands if operating with a Hasura admin secrete or not? How are you making this work? This is a show stopping bug for us right now. Any workaround suggestions would be appreciated. |
I made more investigation of this and made a new issue: #3681 |
This is fixed in #3598 |
Using generated columns, introduced with Postgresql 12, work fine when doing queries or mutations through GraphQL. When trying to insert a row, using the console Insert Row tab, tries to set the column value to NULL, which results in a "unexpected : cannot insert into column" error.
The text was updated successfully, but these errors were encountered: