Q033error

Parameter binding syntax

A parameter line is not in the form $1 as sgl.param(...).

db/queries/example.sql:2:10: error[Q033]: expected 'sgl' after 'as', got "sql"
help: did you mean "sgl"?
Printed by sgl from a small PostgreSQL reproduction project.

When it is reported

The placeholder, the as keyword, the sgl. prefix and the role must appear in that order. When a token is a near miss, such as sa for as, the diagnostic suggests the fix.

How to fix it

Write the line as -- $1 as sgl.param(name).

In your terminal

$ sgl explain Q033

Look for ParameterBindingSyntax in Seagull's source to see where it is reported.