Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local-data-api does not behave the same as the real AWS data-api when handling PreparedStatement string types #137

Open
marcusmateus opened this issue May 8, 2021 · 2 comments

Comments

@marcusmateus
Copy link

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:

  1. Run a prepared statement query providing a string parameter value for a uuid typed column:
It works.
  1. 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.

@koxudaxi
Copy link
Owner

koxudaxi commented May 9, 2021

@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)

@marcusmateus
Copy link
Author

@koxudaxi , it's crunch time at work right now, but I'll put together some example SQL and requests in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants