[FORMATTING] uuidv7() Function Not Supported for PostgreSQL Dialect

The issue concerns the uuidv7() function in PostgreSQL. It looks like sql-formatter doesn't recognize uuidv7 as a function and adds a space before the parenthesis.

Which SQL and options did you provide as input?

CREATE TABLE IF NOT EXISTS users (
    user_id UUID PRIMARY KEY DEFAULT uuidv7()
);

Expected Output

CREATE TABLE IF NOT EXISTS users (
    user_id UUID PRIMARY KEY DEFAULT uuidv7()
);

Actual Output

CREATE TABLE IF NOT EXISTS users (
    user_id UUID PRIMARY KEY DEFAULT uuidv7 ()
);

Usage

  • How are you calling / using the library?
    via command in zed:
"SQL": {
     "formatter": {
       "external": {
         "command": "sql-formatter",
         "arguments": ["--language", "postgresql"]
       }
     }
   },
  • What SQL language(s) does this apply to?
    Postgresql 18.1
  • Which SQL Formatter version are you using? (The exact version number.)
    15.6.11