We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.26.0
Cannot filter and sort on columns from a subselect
sqlc generate # package db query.sql:50:7: column "distance" does not exist
Table "public.clusters" Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description -------------------+--------------------------+-----------+----------+--------------------+----------+-------------+--------------+------------- id | uuid | | not null | uuid_generate_v4() | plain | | | name | text | | not null | | extended | | | cluster_embedding | vector(1536) | | not null | | extended | | | twin_id | uuid | | not null | | plain | | | properties | jsonb | | not null | | extended | | | documents | cluster_document[] | | | | extended | | | ctype | cluster_type | | not null | | plain | | | date_created | timestamp with time zone | | not null | CURRENT_TIMESTAMP | plain | | | date_updated | timestamp with time zone | | | | plain | | | Indexes: "clusters_pkey" PRIMARY KEY, btree (id) Access method: heap
SELECT c.id, c.twin_id, c.name, c.ctype, c.documents, c.distance, c.properties FROM ( SELECT id, twin_id, name, ctype, documents, cluster_embedding <=> $1 AS distance, properties FROM clusters WHERE twin_id = $2 AND ctype = $3 ) AS c WHERE twin_id = $2 AND ctype = $3 AND distance < $4 ORDER BY distance LIMIT $5;
version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "../../../../ai/schemas/postgres" gen: go: package: "db" sql_package: "pgx/v5" out: "db" emit_db_tags: true emit_json_tags: true overrides: - db_type: "uuid" go_type: import: "github.com/gofrs/uuid" type: "UUID"
No response
macOS
PostgreSQL
Go
The text was updated successfully, but these errors were encountered:
any ideas?
Sorry, something went wrong.
Hi team, I want to ping again about this. Any thoughts?
No branches or pull requests
Version
1.26.0
What happened?
Cannot filter and sort on columns from a subselect
Relevant log output
Database schema
SQL queries
Configuration
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
The text was updated successfully, but these errors were encountered: