-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use the method setBlob to insert blob data #605
Conversation
Reported https://liquibase.jira.com/browse/CORE-2937 for this issue. |
@nvoxland can you please take a look at this PR? |
a30e8de
to
dea450d
Compare
rebase the pull request on master |
any change to be merged? |
the issue still open https://liquibase.jira.com/browse/CORE-2937 |
we are using these change since a month for our internal builders and it works. @xjodoin if you provides some unit test maybe the liquibase team could be more encouraged for merge |
Any news on this? We tried adopting version 3.6.1 of Liquibase, but we also encountered the issue mentioned here. We would really appreciate a fix for it. |
Fix for the issue describe in https://liquibase.jira.com/browse/CORE-2937 using the solution proposed by liquibase#605.
Is there a reason you don't merge this pull request? |
dea450d
to
873f966
Compare
any news on this PR? |
@nvoxland Any chance to get this merged? |
In PostgreSQL, Liquibase maps the `blob` type to an `oid` column by default[1]. That column type is not supported[2] very well when using the `valueBlobFile` attribute, which expects a `bytea` column instead. This was confirmed on all PostgreSQL versions starting from 9.6. The `validCheckSum` attribute does not need to be updated since it was already for the previous (binary_type, varchar_type) combination in an unrelated commit (78a99d5). Fixes airsonic#1213. [1] https://liquibase.jira.com/browse/CORE-1863 [2] liquibase/liquibase#605
In PostgreSQL, Liquibase maps the `blob` type to an `oid` column by default[1]. That column type is not supported[2] very well when using the `valueBlobFile` attribute, which expects a `bytea` column instead. This was confirmed on all PostgreSQL versions starting from 9.6. The `validCheckSum` attribute does not need to be updated since it was already for the previous (binary_type, varchar_type) combination in an unrelated commit (78a99d5). Fixes airsonic#1213. [1] https://liquibase.jira.com/browse/CORE-1863 [2] liquibase/liquibase#605
In PostgreSQL, Liquibase maps the `blob` type to an `oid` column by default[1]. That column type is not supported[2] very well when using the `valueBlobFile` attribute, which expects a `bytea` column instead. This was confirmed on all PostgreSQL versions starting from 9.6. The `validCheckSum` attribute does not need to be updated since it was already for the previous (binary_type, varchar_type) combination in an unrelated commit (78a99d5). Fixes airsonic#1213. [1] https://liquibase.jira.com/browse/CORE-1863 [2] liquibase/liquibase#605
In PostgreSQL, Liquibase maps the `blob` type to an `oid` column by default[1]. That column type is not supported[2] very well when using the `valueBlobFile` attribute, which expects a `bytea` column instead. This was confirmed on all PostgreSQL versions starting from 9.6. The `validCheckSum` attribute does not need to be updated since it was already for the previous (binary_type, varchar_type) combination in an unrelated commit (78a99d5). Fixes tesshucom#1213. [1] https://liquibase.jira.com/browse/CORE-1863 [2] liquibase/liquibase#605
Any updates on this? We are also encountering this problem. Would it help if we still keep the |
Hi @xjodoin Sorry for the long delay, I am getting this ready for conditioning, it looks pretty straight forward, if you include tests I can size this down. For now I will leave at a Med. Here is some good info in my typical response to PR submitters: Here’s what happens next: A member of the Liquibase team will take a look at your contribution and may suggest:
The PR will be prioritized according to our internal development and testing capacity. We’ll let you know when it’s ready to move to the next step or if any changes are needed. |
➤ Erzsebet Carmean commented: Thank you for the response, Nathan! CC: [~accountid:557058:c8f0b24d-f02f-431c-8842-fd9c929dfbf2] |
…/liquibase into xjodoin-fix_postgres_blob_insert
@XDelphiGrl It wouldn't be a java version thing, but a driver version. Like from the post, postgresql's 9.4 driver didn't work with setBlob. But that has since been fixed, as we see in the automated testing for this ticket. It won't matter the java version we use, but we do run those automated tests with java 8 and they pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Fix is targeted to managing LOB content in the applyColumnParameter method.
- No additional testing required.
APPROVED
Passing Test Harness Run
Functional Test Results
Note Functional test failures are for the quality checks feature and unrelated to this change.
Thanks @XDelphiGrl to approved my pull request |
Thank you, @xjodoin, for the PR. I hope you have a lovely day! |
On postgresql if you use setBinaryStream the field must be of type bytea but a blob type is oid (ref pull request #600). Instead you must use setBlob method to be able to insert or update data with valueBlobFile