Studio 4.x + VCS & PostgreSQL 9.x

Vik Shah Vik at Keys2Solutions.com.au
Fri Jun 3 18:57:03 EDT 2016


Hi Bas & Stefan,

Thanks for this tip.

I cant believe I missed this one. I knew in the back of my head that the solution must be simple enough, but since there was no reporting of any sorts from VCS there was no way to know what was going on behind the scenes until I debugged the code and saw the incoming data.

I wasn’t able to put the two-and-two together to at the first instance until I saw the errors come in.

Ah well, live and learn.

Regards,

Vik Shah
Director
Keys2Solutions
AU: +61 411 493 495
SE: +46 21-495 01 05
US: +1 (415) 413 4172

> On 3 Jun 2016, at 4:36 PM, Bastiaan Olij <bastiaan at basenlily.me> wrote:
> 
> Hi Vik,
> 
> 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
> is used.
> 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:)
> 
> Cheers,
> 
> Bas
> 
> On 3/06/2016 4:19 PM, Vik Shah wrote:
>> Hi!
>> 
>> 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. :-)
>> 
>> Regards,
>> 
>> Vik Shah
>> Director
>> Keys2Solutions
>> 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
> 
> 
> -- 
> Kindest Regards,
> 
> Bastiaan Olij
> e-mail: bastiaan at basenlily.me
> web: http://www.basenlily.me
> Skype: Mux213
> http://www.linkedin.com/in/bastiaanolij
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com








More information about the omnisdev-en mailing list