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

fix(core-database-postgres): store vendor field in bytea #3048

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

vasild
Copy link
Contributor

@vasild vasild commented Oct 9, 2019

  • We support utf8 strings for vendor field
  • \u0000 (nul byte) is a valid utf8 string
  • PostgreSQL cannot store \u0000 in VARCHAR

It follows that we cannot use VARCHAR for storing vendor field.
So use bytea for that.

@codecov
Copy link

codecov bot commented Oct 9, 2019

Codecov Report

Merging #3048 into develop will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3048      +/-   ##
===========================================
+ Coverage    65.61%   65.62%   +<.01%     
===========================================
  Files          425      425              
  Lines        11733    11733              
  Branches      1595     1595              
===========================================
+ Hits          7699     7700       +1     
  Misses        3997     3997              
+ Partials        37       36       -1
Impacted Files Coverage Δ
packages/core-api/src/plugins/pagination/ext.ts 81.13% <0%> (+1.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 892a610...5a70810. Read the comment docs.

* We support utf8 strings for vendor field
* \u0000 (nul byte) is a valid utf8 string
* PostgreSQL cannot store \u0000 in VARCHAR

It follows that we cannot use VARCHAR for storing vendor field.
So use bytea for that.
@vasild vasild changed the title fix(core-database-postgres): properly decode vendor_field_hex fix(core-database-postgres): store vendor field in bytea Oct 10, 2019
@spkjp spkjp merged commit 63dc252 into develop Oct 10, 2019
@ghost ghost deleted the fix-vendor-field-decode branch October 10, 2019 22:25
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

Successfully merging this pull request may close these issues.

2 participants