Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Disable bytes usage with postgres #6186

Merged
merged 7 commits into from
Oct 10, 2019
Merged

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Oct 8, 2019

More often than not passing bytes to txn.execute is a bug (where we
meant to pass a string) that just happens to work if BYTEA_OUTPUT is
set to ESCAPE. However, this is a bit of a footgun so we want to
instead error when this happens, and force using bytearray if we
actually want to use bytes.

Based on #6185

@erikjohnston erikjohnston requested review from a team and removed request for a team October 8, 2019 15:25
More often than not passing bytes to `txn.execute` is a bug (where we
meant to pass a string) that just happens to work if `BYTEA_OUTPUT` is
set to `ESCAPE`. However, this is a bit of a footgun so we want to
instead error when this happens, and force using `bytearray` if we
actually want to use bytes.
@erikjohnston erikjohnston force-pushed the erikj/disable_sql_bytes branch from 75b53a6 to 1d38583 Compare October 8, 2019 15:29
@erikjohnston erikjohnston force-pushed the erikj/disable_sql_bytes branch 2 times, most recently from 763f430 to c3b34dc Compare October 10, 2019 12:08
@erikjohnston erikjohnston requested a review from a team October 10, 2019 12:09
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

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

Successfully merging this pull request may close these issues.

2 participants