Studio 4.x + VCS & PostgreSQL 9.x
bastiaan at basenlily.me
Fri Jun 3 02:36:02 EDT 2016
This is because when Postgres 9 came out they introduced the new output
format of binaries and made it the default, but the DAM in Studio 4 was
written before this came out and is unaware of the new formatting. I
believe newer DAMs are able to handle both HEX and ESCAPE modes and will
take whatever it is given.
Changing the output setting on the server may not always be an option
for people if the Postgres database is used for other databases as well,
the solution I've used for many years is to create a user called
"vcsuser" with which I log into the database and setting the formatting
for that user as follows:
ALTER ROLE vcsuser
SET bytea_output = 'escape';
The added bonus is that this user only has rights on my VCS databases
and I can't use it to access any of our other production databases.
Now every time that user logs in the old escape formatting of binaries
I'm still using this in Studio 6 as well, while I'm pretty sure the DAMs
are now able to handle HEX escaped binaries I'm playing it safe:)
On 3/06/2016 4:19 PM, Vik Shah wrote:
> Just want to share a finding with everyone here about VCS and PostgreSQL v9.x.
> When you are faced with setting up a brand new using Studio 4.x (this is where I have tried) you are able to setup the VCS repository and perform the initial checkin all ok.
> BUT, when its time to either check something out or build the project from the VCS, the VCS will seem like it may have worked or it will just through a generic error message.
> The reason for this failure is that when storing into the database the binary blob goes in as binary data from omnis but when being retrieved it comes out as default HEX.
> Omnis VCS assumes that incoming data is binary blob and stores into a binary field and performs a checksum on it and compares it against the vcs_component.blob_checksum. This check fails because the blob_checksum was calculated at the time of inserting/updating the record from omnis library’s class data binary and not the hex version of that binary.
> If anyone here wants a tweaked VCS lib send me a message off the list and I’ll be happy to provide it.
> OR if anyone here has a better solution to this issue please share. :-)
> Vik Shah
> AU: +61 411 493 495
> SE: +46 21-495 01 05
> US: +1 (415) 413 4172
> Manage your list subscriptions at http://lists.omnis-dev.com
e-mail: bastiaan at basenlily.me
More information about the omnisdev-en