Q013warning

Writes a generated column

A parameter assigns to a generated column, which cannot be written.

db/queries/example.sql:1:1: warning[Q013]: parameter 4 assigns to generated column "shelf" which cannot be written to
Printed by sgl from a small PostgreSQL reproduction project.

When it is reported

Generated (computed) columns take their value from an expression, so the database rejects any INSERT or UPDATE that sets them.

How to fix it

Remove the column from the INSERT or UPDATE.

See it in an example

In your terminal

$ sgl explain Q013

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