How can I run the following query, where I have a WHERE IN clause. I need to pass a vec or array of strings to it as argument.
Which PgBuiltInOids should I use in this case?
I tried the form below without success.
let names: Vec<&str> = ["name1", "name2"];
Spi::connect(|client| {
let result = client
.select("SELECT * FROM mytable WHERE name IN ($1);",
None,
Some(vec![(PgBuiltInOids::TEXTARRAYOID.oid(), names.as_slice().into_datum())]),
)
.unwrap_or_report()
.collect::<Vec<_>>();
});
Hi PGRX team,
How can I run the following query, where I have a
WHERE IN
clause. I need to pass a vec or array of strings to it as argument. WhichPgBuiltInOids
should I use in this case?I tried the form below without success.