hasura / hasura/graphql-engine

Postgres is truncating identifiers in 2.10.1

Open
#8,899 0 comments 0 reactions 0 assignees View on GitHub
k/bug t/native-dbs
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.