SQL Execution Failed postgres-error: syntax error at or near "\"
Author: jcmoore0Created Nov 12, 2021Updated Sep 22, 2026
Labelsk/bug
Version Information
Server Version: v2.0.10 CLI Version (for CLI related issue): v2.0.9
Environment
GCP GKE
What is the expected behaviour?
no error when tab characters in migration SQL
Keywords
SQL Execution Failed postgres-error: syntax error at or near "\"
What is the current behaviour?
SQL Migration Execution Fails when a tab character '\t' is inside the script Migration execution succeeds when removing all \t. Previous Hasura versions allowed tab characters in SQL script. When I 'modify' tracked functions, they will fail until I search and remove all \t.
How to reproduce the issue?
- Put a tab character in a SQL Migration Script
Screenshots or Screencast
Please provide any traces or logs that could help here.
{
"internal": {
"statement": "CREATE OR REPLACE FUNCTION something() \nreturns setof ....
"prepared": false,
"error": {
"exec_status": "FatalError",
"hint": null,
"message": "syntax error at or near \"\\\"",
"status_code": "42601",
"description": null
},
"arguments": []
},
"path": "$[0]",
"error": "query execution failed",
"code": "postgres-error"
}Any possible solutions?
Can you identify the location in the source code where the problem exists?
If the bug is confirmed, would you be willing to submit a PR?
Source: hasura/graphql-engine