Skip to content

inline-sql-function-body-wrong-language (GN035)#

Automatic fix is available.

What it does#

Checks for inline sql function bodies which are not defined with LANGUAGE SQL.

Why not?#

Inline SQL function bodies are only valid for language SQL. While PostgreSQL parses such functions, they fail at creation with the error below:

ERROR:  inline SQL function body only valid for language SQL

When should you?#

Never.

Use instead:#

LANGUAGE SQL.