in reply to how to tell if ->insert succeeded in DBIx::Class?

  1. Prevent inserts with a lock.
  2. Check if the key exists.
  3. If not, insert the record.
  4. Release the lock.

I don't see anything that would allow what you want more directly in the PostgreSQL or DBIx::Class docs. Neither even support a database-level "insert or update".

I'm by no means a DBIx::Class expert. Or user.

  • Comment on Re: how to tell if ->insert succeeded in DBIx::Class?