hasura / hasura/graphql-engine
Insert into Postgres Partitioned Table Fails -SQL Error [0A000]: ERROR: cannot retrieve a system column in this context
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version:
CLI Version (for CLI related issue):[v2.25.1-ce]
### Environment
GCP Cloud Run
### What is the current behaviour?
Mutation Fails when inserting into partitioned table
### What is the expected behaviour?
insert should work
issue appears due to the returning clause containing xmax, when removed the following error goes away
SQL Error [0A000]: ERROR: cannot retrieve a system column in this context
returning * ,
case
when ("xx"."xxx"."xmax") = (0)
then ('true')::boolean
else ((((("xx"."xxx"."xxxx") = (('00000000-0000-0000-0000-000000000000')::uuid))
or ((("xx"."xxx"."xxxx") is null)
and ((('00000000-0000-0000-0000-000000000000')::uuid) is null)))
and ('true'))
and ('true'))::boolean
end as "check__constraint")
### How to reproduce the issue?
1.Create a partitioned table with a unique constraint
2.Insert data
3.
### Screenshots or Screencast
### Please provide any traces or logs that could help here.
### Any possible solutions/workarounds you're aware of?
### Keywords
Contributor guide
Assessment
This issue has not been assessed yet.