darold / pgFormatter

A PostgreSQL SQL syntax beautifier that can work as a console program or as a CGI. On-line demo site at http://sqlformat.darold.net/
PostgreSQL License
1.69k stars 101 forks source link

no-space-function isn't always respected #303

Closed fenuks closed 1 year ago

fenuks commented 1 year ago

I tested this on the latest tagged version (5.4), as well on the latest git version.

This feature is described

# Remove the space character between a function call and the open parenthesis that follow.

, but it doesn't work in all cases.

$ echo 'SELECT app_public.hello ('test'); DROP FUNCTION IF EXISTS app_public.hello (a text);' | pg_format --no-space-function
SELECT
    app_public.hello (test);

DROP FUNCTION IF EXISTS app_public.hello(a text);
darold commented 1 year ago

Commit 8758b0e7 fixes this issue.

fenuks commented 1 year ago

Thank you!