You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLR type System.Object isn't natively supported by Npgsql or your PostgreSQL. To use it with a PostgreSQL composite you need
to specify DataTypeName or to map it, please refer to the documentation.
I guess I need to use DynamicParameters object and specify type name manually, but it accepts enum instead of string and in enum there is no such value like object or record.
I need it for query like this one:
SELECT*FROM peopletable
WHERE ROW(firstname, lastname) = ANY(@people)
Can someone guide me how to do it?
The text was updated successfully, but these errors were encountered:
FLAMESpl
changed the title
How to pass record in parameters with npgsql
How to pass array of records in parameters with npgsql
Feb 17, 2024
however, I think my question is not valid anymore as for some reason it is possible to compare two records in postgres, it is impossible to check if record exists in an array
I don't think that's a scenario we've had cause to look at. I think for now the answer is "we don't have an option for that" - happy to add it to the pile of candidates if it is a useful / common thing.
How to pass array of records postgres type as a parameter from c#?
I have tried to send it the same way it is received from query result - as double array of objects, but npgsql complains about it:
I guess I need to use DynamicParameters object and specify type name manually, but it accepts enum instead of string and in enum there is no such value like
object
orrecord
.I need it for query like this one:
Can someone guide me how to do it?
The text was updated successfully, but these errors were encountered: