Skip to content

Commit 7ebef46

Browse files
authored
Documentation on slice as parameter to a query (#999)
I spent quite a time figuring this one out because it's not mentioned in the documentation that we have to pass postgres data types. I was using ANY(sqlc.arg(roles)::string[]) which is supposed to be ANY(sqlc.arg(roles)::varchar[]).
1 parent 77db7d1 commit 7ebef46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/howto/select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ In PostgreSQL,
189189
[ANY](https://www.postgresql.org/docs/current/functions-comparisons.html#id-1.5.8.28.16)
190190
allows you to check if a value exists in an array expression. Queries using ANY
191191
with a single parameter will generate method signatures with slices as
192-
arguments.
192+
arguments. Use the postgres data types, eg: int, varchar, etc.
193193

194194
```sql
195195
CREATE TABLE authors (

0 commit comments

Comments
 (0)