Using PHP I get this message when trying to against my UNIQUE constraint.
Warning: pg_query(): Query failed: ERROR: duplicate key violates
unique constraint "category_name_key" in foo.php on line 12
Instead of this message, I would like something like this:
a popup button comes up and says, "This already exists". I guess I can
use Java script or something.
But is it possible to write a sql function to handle this?
TIA!