This solution look great, because until now web2py was triggering a error
if postgres return not unique and won't insert the data...

So, maybe as you suggest Johann this is not the case anymore with recent
web2py update, I don't know.

But I think we would need a confirmation about Massimo or other Core
developper about that.

Anyway, I will remember the Michele solution and try it, it looks
effective. My only concern about that is if you don't write a custom
validators that will check the constrain at the form level, the user will
never understand their mystake and maybe don't even know their information
have not been inserted in database if it failed silently...

Richard

On Fri, Apr 13, 2012 at 1:59 PM, Johann Spies <johann.sp...@gmail.com>wrote:

> On 13 April 2012 19:26, Michele Comitini <michele.comit...@gmail.com>wrote:
>
>> Johan,
>>
>> To do what you want to achieve you could look into SAVEPOINTs.
>> PostgreSQL supports them.  They allow to recover the current
>> transaction to a predefined savepoint in case of error.  The DAL does
>> not support SAVEPOINT support, yet, but you can use them through
>> executesql().
>>
>> mic
>
>
> Thanks!
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)
>
>

Reply via email to