Skip to content
New issue

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

pq.Array still in use? #989

Closed
deelienardy opened this issue Apr 29, 2021 · 2 comments
Closed

pq.Array still in use? #989

deelienardy opened this issue Apr 29, 2021 · 2 comments
Labels
📚 postgresql bug Something isn't working invalid This doesn't seem right 🔧 golang

Comments

@deelienardy
Copy link

schema

CREATE TABLE "test_table"
(
	"key" VARCHAR(255) NOT NULL PRIMARY KEY,
	"created_at" TIMESTAMP WITH TIME ZONE
);

query

-- name: FindByIDs :many
SELECT 
    "key", "created_at"
FROM "test_table"
WHERE "key" = ANY($1::varchar[]) 
ORDER BY "created_at" DESC;

I have to do some query like above, after i generate the query, i found codegen still use pq.Array.
Since #472 already closed, is this intended to still use pq.Array ?

@kyleconroy kyleconroy added the invalid This doesn't seem right label Aug 20, 2021
@kyleconroy
Copy link
Collaborator

@deelienardy Have you set sql_package to pgx/v4? Can you also provide your sqlc.json or sqlc.yaml file?

@kyleconroy kyleconroy added question Further information is requested and removed invalid This doesn't seem right labels Aug 21, 2021
@kyleconroy
Copy link
Collaborator

By default, pq.Array will still be generated. If you set sql_package to pgx/v4, pq.Array should not be included in any generated code. If it does, that's an error.

@kyleconroy kyleconroy added bug Something isn't working 🔧 golang invalid This doesn't seem right 📚 postgresql and removed question Further information is requested labels Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 postgresql bug Something isn't working invalid This doesn't seem right 🔧 golang
Projects
None yet
Development

No branches or pull requests

2 participants