sqlc
sqlc copied to clipboard
postgres insert smallint[]
Version
1.12.0
What happened?
when postgres insert smallint[]
pq: parsing array element index 0: pq: scanning to int16 is not implemented
pq.array not implemented []int16
Relevant log output
pq: parsing array element index 0: pq: scanning to int16 is not implemented
Database schema
create table attendance
(
id varchar(36) primary key not null,
project_id varchar(36) not null,
staff_id varchar(36) not null default '',
staff_no varchar(36) not null default '',
staff_name varchar(36) not null default '',
department_id varchar(36) not null default '',
department_name varchar(36) not null default '',
check_in_time timestamp default null,
check_out_time timestamp default null,
states smallint[] not null,
created_at timestamp not null default current_timestamp,
updated_at timestamp not null default current_timestamp,
deleted_at timestamp default null
);
SQL queries
-- name: AddAttendance :one
insert into attendance(id,
project_id,
staff_id,
staff_no,
staff_name,
department_id,
department_name,
check_in_time,
check_out_time,
states)
values (@id,
@project_id,
@staff_id,
@staff_no,
@staff_name,
@department_id,
@department_name,
@check_in_time,
@check_out_time,
@states)
returning *;
Configuration
No response
Playground URL
https://play.sqlc.dev/p/07d82433867ff598f1f76a69f3a3659697149def862362b775b0cf5b9e732763
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go