Dmitry Teslenko wrote:
These solution work and enforce data integrity as needed. Sadly, database
interface I use (Trolltech Qt 3) can't track when trigger aborts
update or insert. Can I raise exception in trigger or something?

RAISE EXCEPTION 'Failed to update mytable: date range (%,%) overlaps an existing entry', NEW.from_dt, NEW.to_dt;

You can also do RAISE NOTICE, WARNING etc. See the pl/pgsql section of the manual for details.

--
  Richard Huxton
  Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to