Open ryanaston opened 2 years ago
In theory we should have full int8
support both in Dart and in package:postgres
. We should have a test or two that uses it as input and output for a query, but I don't recall the details right away. If you have some time, please debug it a bit more, I'm happy to accept PRs...
Note: #264 suggests we have already fixed the :int8
part, not sure if/how the untyped part should work.
Dart
ints
are 64-bit, so I assumed this would work:await connection.query("SELECT TO_TIMESTAMP(@ts / 1000)", substitutionValues: {'ts': 1640556171599});
However, I get the following error when running the query above:
I attempted to remedy by specifying the data type in the query, like so:
await connection.query("SELECT TO_TIMESTAMP(@ts:int8 / 1000)", substitutionValues: {'ts': 1640556171599});
This causes a different error:
Is this a bug or am I mistaken on how to safely use 64-bit
ints
as query parameters?