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

bug: RDS Data execute statement returns {} for BYTEA type on postgres #11479

Open
1 task done
newhoggy opened this issue Sep 8, 2024 · 1 comment
Open
1 task done
Labels
aws:rds Amazon Relational Database Service status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@newhoggy
Copy link

newhoggy commented Sep 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

For the following table:

        CREATE TABLE "shards" (
          "object_ulid" CHAR(26) REFERENCES "objects"("object_ulid"),

          "shard_index" INT NOT NULL,
          "shard_data" BYTEA NOT NULL,
          "shard_txid" CHAR(64),
          "shard_tx_on_chain" BOOLEAN NOT NULL,

          PRIMARY KEY ("object_ulid", "shard_index"),

          -- Constraint to enforce valid ULID
          CONSTRAINT "valid_ulid_constraint" CHECK ("object_ulid" ~ '^[0-9A-HJKMNP-TV-Z]{26}$')
        );

Querying for all the columns in the table results in the following response:

{
    "records": [
        [
            {
                "stringValue": "01J78A3XQ3H75JFVQ14V58Q9E0"
            },
            {
                "longValue": 1
            },
            {},
            {
                "stringValue": "shard_txid                                                      "
            },
            {
                "booleanValue": false
            }
        ]
    ],
    "numberOfRecordsUpdated": 0
}

The shard_data column of the type BYTEA returns no data.

Expected Behavior

Data should be returned consistent with what RDS Data returns on AWS.

Which is this:

{
    "records": [
        [
            {
                "stringValue": "01J78A3XQ3H75JFVQ14V58Q9E0"
            },
            {
                "longValue": 1
            },
            {
                "blobValue": "aGVsbG8gd29ybGQ="
            },
            {
                "stringValue": "shard_txid                                                      "
            },
            {
                "booleanValue": false
            }
        ]
    ],
    "numberOfRecordsUpdated": 0
}

Note the object with the blobValue field which is the base64 encoding of the binary value:

$ echo 'aGVsbG8gd29ybGQ=' | base64 -d
hello world

How are you starting LocalStack?

Custom (please describe below)

Steps To Reproduce

Via test suite launcher in Haskell

Environment

localstack/localstack-pro   latest    8cca65067d42   37 hours ago   1.79GB
  • OS:
  • LocalStack: latest
    LocalStack version: latest
    LocalStack Docker image sha:
    LocalStack build date:
    LocalStack build git hash:


### Anything else?

_No response_
@newhoggy newhoggy added status: triage needed Requires evaluation by maintainers type: bug Bug report labels Sep 8, 2024
@Anze1508 Anze1508 added aws:rds Amazon Relational Database Service status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels Sep 9, 2024
@newhoggy
Copy link
Author

I'm keen for a fix for this. Anything I can do to help expedite it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:rds Amazon Relational Database Service status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants