Open
Description
CREATE TYPE
CREATE TYPE myarg as (
id integer,
name text
);
-- name: BasicQuery :one
select $1::myarg;
Automatic table types
https://www.postgresql.org/docs/current/rowtypes.html
Whenever you create a table, a composite type is also automatically created, with the same name as the table, to represent the table's row type. For example, had we said:
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
bio text
);
-- name: AutomatiicType :many
select authors from authors;