[bug] Query Library `DO` statements are poorly formatted

in postgresQL, DO statements execute anonymous function code. they typically look like DO $$ DECLARE ... BEGIN ... END $$.

Retool syntax highlighting between BEGIN and END treats the entire block as green text (strings), which isn't wrong per se, but you lose all the useful colors specific to the language you'd normally get, significantly reducing readability and debugging.

in most VS Code postgres extensions, the syntax highlighting treats code in DO statements similarly to any other queries not inside an anonymous code block.

it would be great if Retool Query Library editor parsed and highlighted the postgres language within DO statements.

thank you!

Retool Query Library:

VS Code:

like most issues in my (short) career so far, i usually discover stuff like this when there's an obviously better way of solving it waiting in the corner for me to notice...

1 Like