#CT is Negative

Andreas Pfeiffer apfeiffer at familiepfeiffer.de
Wed Feb 22 04:41:37 EST 2017


Hello listers,

Would the new function (since Omnis Studio 8.0.2) to generate the UUID help in this case?

OWEB.$makeuuid()

Best regards,

Andreas

> Am 22.02.2017 um 08:41 schrieb Bastiaan Olij <bastiaan at basenlily.me>:
> 
> Hey Doug,
> 
> Better to use a sequence:
> https://www.postgresql.org/docs/9.5/static/sql-createsequence.html
> 
> Does the same thing but ensures MVCC doesn't result in two sessions
> updating CC_Table.next_num to the same value. Unless you use a
> sequential transaction but that was only introduced in 9.4.
> 
> Cheers,
> 
> Bas
> 
> On 22/02/2017 10:54 AM, Doug Easterbrook wrote:
>> hi MIchael:
>> 
>> we have to use a unique number for our credit card providers…and as Bas points out,    #CT is good enough for 24 days, and isn’t really random -0- and you could run into conflict.
>> 
>> 
>> we use a unioque sequential number….   and I think you use postgres, so our basic way to grab the next number is
>> 
>> 
>> update CC_Table set next_num=next_num + 1 returning next_num
>> 
>> 
>> that way we can never have a conflict on the value of ’next_num' and it keeps on growing.        you can make it numeric (17,0)   which is basically a float 0dp number.
>> 
>> good enough for a very large number of credit card authorizations.
>> 
>> hope that helps.
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com





More information about the omnisdev-en mailing list