Closed
Description
Version
1.9.0
What happened?
Expected sqlc generate
to create a function to be used in Go code. This is an alternative attempt to solve the issue found here: #1126.
Relevant log output
sql/queries/lot_attributes.sql:133:1: relation "pg_enum" does not exist
Database schema
-- migrate:up
CREATE TYPE lot_destination_status AS ENUM ('origin', 'in_transit', 'spot')
SQL queries
-- name: LotDestinationStatus :many
SELECT
enum.enumlabel AS value
FROM
pg_enum AS enum
JOIN pg_type AS type ON (type.oid = enum.enumtypid)
WHERE
type.typname = 'lot_destination_status'
GROUP BY
enum.enumlabel,
type.typname;
Configuration
version: "1"
packages:
- name: "store"
path: "store"
queries: "./sql/queries"
schema: "./sql/migrations"
engine: "postgresql"
emit_json_tags: true
emit_prepared_queries: true
emit_interface: false
emit_exact_table_names: false
emit_empty_slices: false
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go