Issue w/ CLI psql and files saved from Postico
- Dominant language
- Python
- Stars
- 486
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Using Postico 1.5.10, build 5293.
Sometimes when I save files from the Postico editor, and then use the `psql` CLI tool to run them, they error out with syntatical errors that are clearly some kind of weird encoding errrors, e.g:
```
select *
from myothertable
join myschema.table as mytable
on mytable.col = myothertable.col;
```
Will yield:
```
ERROR: syntax error at or near "."
LINE 3: join myschema.table as mytable
^
```
Or:
```
ERROR: syntax error at or near "join myschema"
LINE 3: join myschema.table as mytable
^
```
And when I go into an editor such as Visual Code, and retype theses lines verbatim, the "syntax" error goes away.
I am using the CLI `psql` tool from 11.5 from your Postgres package, but I've seen the weird error on production systems using Postgres from Ubuntu packages.
I believe it might be space related, as when I double click on the word `mytable` in either the `join` clause or its `on` clause, Visual Code will highlight the word `on` before it, as well as the space between: essentially it will highlight some longer sequence of space-separated words, and manually deleting these spaces and re-typing fixes the file.
(hoping this makes sense!)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the problem with a SQL file saved from the Postico editor and run it with the psql CLI tool from PostgreSQL 11.5. Compare the spaces and encoding with the same lines retyped in Visual Code. Done means files saved from Postico run without the reported syntax errors in psql.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100