Thanks!
Great work! :)

On Sat, Jan 21, 2012 at 3:18 AM, Conor <conor.edward.da...@gmail.com> wrote:

>
>
> def get_constraint_name(e):
>    # Unique constraint violations in PostgreSQL have error code 23505.
>    if e.orig.pgcode == "23505":
>        return re.search(r'^ERROR:  duplicate key value violates unique
> constraint "(.*?)"',
>                         e.orig.pgerror).group(1)
>    else:
>        <handle other constraint types>
>
> -Conor
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to