SonarQube Parsing of Custom Types in PostgreSQL 17

…Using PostgreSQL 17 (latest).
(actual SQL is redacted)

While scanning with SonarQube, we get these kinds of logs:

16:48:38.213 WARN  Unable to fully parse: /path/file.sql
16:48:38.213 WARN  Parse error starting from line 12

The lines refers to custom types such as:

CREATE TYPE wheel_type AS ENUM ('ONE', 'TWO', 'THREE');

CREATE TYPE car_wheel AS
(
    wheel_diameter FLOAT, -- meters
    wheel_width    FLOAT, -- degrees
    wheel_type     WHEEL_TYPE,
);

But when the types are used in a table, no warning is generated.

Does SonarQube support custom types in PostgreSQL ?

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hey @augie!

SonarQube supports analyzing PL/SQL (Oracle syntax), T-SQL (Microsoft Syntax) but no PL/pgSQL (Postgres specific syntax). You can review supported languages here.

You may want to exclude such files from analysis.