Currently Prepared Statements only work if they only use bindings that have the PostgresDataTypetext. The reason for this is that text has the same representation in text and binary form. For this reason Postgres does not need to know the datatype upfront.
Changes
Allow users to specify the bindings datatypes explicitly. Fallback to unspecified.
If binding datatypes are unspecified infer them from the first provided bindings
Allow users to override the prepared statement name
Motivation
Currently Prepared Statements only work if they only use bindings that have the
PostgresDataType
text
. The reason for this is thattext
has the same representation intext
andbinary
form. For this reason Postgres does not need to know the datatype upfront.Changes