sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Generate type-safe code from SQL

Results 584 sqlc issues
Sort by recently updated
recently updated
newest added

Hello, Is allowed to use unnest? ```sql INSERT INTO inventory(id, json_row, name) SELECT * FROM unnest(Array[48]::int[], ARRAY['{}']::json[], ARRAY['me']::varchar[]); ``` I have this error: > function unnest(unknown, unknown) does not exist...

In a nested sub-select from a single table, sqlc reports an ambiguous column reference even though the inner query is only from a single table. **Config: sqlc.yaml** ```yaml version: "1"...

bug
:books: postgresql

### Version 1.14.0 ### What happened? batch.go will import "github.com/jackc/pgconn" without using it if you use `:execresult` and `:batchexec` in the same query.sql file ### Relevant log output _No response_...

bug
triage

### Version 1.14.0 ### What happened? After I noticed #1605 was added to 1.14 I ran the new version against our code, as I know there's a few `CHANGE COLUMN`...

bug
:books: mysql
:wrench: golang
:computer: linux

### What do you want to change? For Go, sqlc will use a positional argument for a query if there's a single parameter. If there's more than one, it will...

enhancement
good first issue
accepted

### What do you want to change? ```sql -- name: ListAuthors :many SELECT * FROM authors ORDER BY $1 $2; ``` - Example 1: ```sql SELECT * FROM authors ORDER...

enhancement
:books: postgresql
:wrench: golang

### Correct Behavior The following query: ```sql -- name: selectUserByUsername :one SELECT * FROM users WHERE LOWER(username) = $1 AND age = $2 LIMIT 1; ``` Generates this Go code:...

bug

### Version 1.10.0 ### What happened? To be fair, this is less of a bug but more about "follow upstream" report 😄 [PostgreSQL 14 considers `CREATE OR REPLACE TRIGGER`](https://www.postgresql.org/docs/current/sql-createtrigger.html) a...

bug
:books: postgresql
upstream
:wrench: golang
:computer: linux

I have a table with BIGSERIAL ID: ``` CREATE TABLE datastore_index ( id BIGSERIAL PRIMARY KEY, key VARCHAR(1000) UNIQUE NOT NULL, size INT NOT NULL, created_at TIMESTAMPTZ NOT NULL );...

bug
:books: postgresql

I am creating two distinct functions but sqlc (both v1.7.0 and v1.8.0) seems to think they are the same function! ```sql CREATE FUNCTION myfunction(text[], text[]) RETURNS real LANGUAGE plpgsql AS...

bug
:books: postgresql