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;
Activity
kirk-anchor commentedon Sep 27, 2023
Support for composite types of a TABLE/TYPE would be great. A further improvement would be supporting arbitrary record types that don't belong to a TABLE/TYPE if that would be possible.
9 remaining items