Thanks for all the comments. Do I need to use BEGIN/COMMIT in my plpgsql-function for UPSERT or are functions atomic? Regards Alex -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general