On Thu, May 13, 2004 at 11:41:24AM +0200, Christian Rank wrote:
>       create function f () returns void as '
>       begin
>         delete from a;
>         delete from b;
>         return;
>       end;
>       ' language plpgsql;
> 
> I would expect that
> 
>       select f();
> 
> yields an error message about constraint violation when executing
> 'delete from a;'.

Off the top of my head, the constraints would be checked when the
transaction ends, i.e., after both the "delete from a" and "delete from b"
happened. Split into 2 transactions?

Cheers,

Patrick

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to