Skip to content

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

@marcusmateus

Description

@marcusmateus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions