hasura / hasura/graphql-engine
Postgres is truncating identifiers in 2.10.1
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.10.1
### What is the current behaviour?
We are getting warning in postgres like this one:
```
identifier "ae6db31db4265ea6433a54d889f0c6a5_root.or.payment.ar.payment.refunds.cf.statusHistory.pg.entered_at" will be truncated to "ae6db31db4265ea6433a54d889f0c6a5_root.or.payment.ar.payment.ref"
```
### What is the expected behaviour?
Hasura should shorten identifiers to avoid automatic truncation
### How to reproduce the issue?
1. Make a query with long nested fields
2. See the warning in postgres
Contributor guide
Research direction
No source file or test is identified in the issue. Start by reproducing a query with long nested fields against Postgres 2.10.1, then trace where Hasura constructs the nested identifiers. Done means generated identifiers are shortened before Postgres truncates them and the warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100