PG Doc comments form <noreply@postgresql.org> writes:
> Example on this page is not working
> https://www.postgresql.org/docs/13/pltcl-trigger.html
> Gives ERROR: bind message supplies 1 parameters, but prepared statement ""
> requires 0
Works fine for me, when copied-and-pasted into psql.
The error message you quote looks a bit like whatever client-side
code you're using has decided that the $1 references in the function
body are query parameters. They are not. The function body is a
dollar-quoted string literal and should be sent unmodified.
regards, tom lane