backslash is not defined in `PostgresLexer`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 885
- PR merge metrics
- No merged PRs in 30d
Description
I stumbled on this problem multiple times. I need to lex an SQL script for PostgreSQL, specifically for creating and connecting to DB and creating tables in it. Everything works fine, but I don't know why such command as \connect is not defined. With minted package for TeX-family typesetting systems, the output of PDF file shows that the backslash in \connect command is not defined (or probably the command itself):

Other PostgreSQL lexers work even worse (some other commands are also not defined). After running python3 -I _postgres_builtins.py nothing has changed. Is this a bug or unimplemented syntax?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the PostgresLexer and the _postgres_builtins.py generation step mentioned in the report. Reproduce the minted output for a PostgreSQL script containing \connect, then determine whether the lexer recognizes that command; done means the command is highlighted correctly without regressing the other PostgreSQL syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100