local-data-api does not behave the same as the real AWS data-api when handling PreparedStatement string types
First, a big thank you for this fantastic project and all the work that has clearly been put into it. It is very much appreciated.
Describe the bug Running certain queries does not behave the same in local-data-api as in a real AWS Aurora Serverless environment via the data-api.
local-data-api sets the postgres JDBC connection parameter stringtype to unspecified here, however AWS data-api simply uses the default of VARCHAR. The postgres docs describe the operation of the stringtype parameter here.
To Reproduce Steps to reproduce the behavior:
- Run a prepared statement query providing a string parameter value for a uuid typed column:
It works.
- Run the same query agains data-api in AWS:
BadRequestException: Database error code: 0. Message: ERROR: column "id" is of type uuid but expression is of type character varying
I can try to generate some http requests you can quickly run directly as a test / proof if that would be helpful.
Expected behavior To the extent possible local-data-api should behave the same as the real AWS data-api
Additional context This divergence was introduced in PR#108, which seems to have been done at least in part as a fix for #106. @koxudaxi references this exact problem in this comment where they note that local-data-api behaves differently than the real AWS data-api.
@marcusmateus Thank you for creating this issue. I tried to reproduce the error. But, I can't do it. I can insert values into UUID columns.
Would you please show your DB schema and query?
I want to check your command or code to insert UUID via aws SDK (or Boto3)
@koxudaxi , it's crunch time at work right now, but I'll put together some example SQL and requests in the next few days.