mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.43k stars 290 forks source link

Formatting breaks postgres commands (e.g. \echo) #1259

Open ostollmann opened 6 months ago

ostollmann commented 6 months ago

Describe the bug Formatting of Postgres commands breaks the commands.

To Reproduce Steps to reproduce the behavior:

  1. Format the following:
    \echo Hello
    SELECT 1;
  2. Notice the invalid result:
    \ echo Hi!
    SELECT 1;

    Expected behavior

    \echo Hello
    SELECT 1;

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

GitFenixZ commented 4 months ago

I also have the same problem !

This behavior can also be seen in the playground if you want to reproduce it in a convenient way.

Writing the queries below in the EDITOR section:

\echo "ECHO A";
\echo "ECHO B";
\echo "ECHO C";

will give the result below in the PREVIEW section:

\ echo "ECHO A";

\ echo "ECHO B";

\ echo "ECHO C";