dbeaver icon indicating copy to clipboard operation
dbeaver copied to clipboard

External formatter don't output stderr

Open Anteus opened this issue 8 months ago • 2 comments

Is your feature request related to a problem? Please describe. Trying to use sqlfmt as an external formatter but it outputs some info on stderr and can't get rid of that from the output e.g. 2>nul doesn't work in that field.

install sqlfmt: pip install shandy-sqlfmt[jinjafmt]

use with sqlfmt - in DBeaver as External formatter

outputs formatted query and also:

1 file formatted.
0 files left unchanged.
- formatted.

Describe the solution you'd like Not outputting stderr from external formatter

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Anteus avatar Apr 25 '25 14:04 Anteus

Thanks for the suggestion

ShadelessFox avatar Apr 28 '25 15:04 ShadelessFox

Oh wait, DBeaver uses not just stdout but also stderr for the formatter "result"?

That explains why i've been having so much trouble trying to get various external formatters to work. stderr should not be used for something like this...

My workaround is using bash -c "formatter 2> /dev/null" to discard stderr before it can reach DBeaver

laundmo avatar Nov 20 '25 12:11 laundmo