Add 2 tabs to the Table and Column window: One for index definition and one for view definition
Index definition should be available for all tables except IsView=Y
View definition should only be available if IsView=Y
Create a process to create database index and view from the definition above
When it's a unique index, allow user to select an error message from AD_Message (The idea is we can perform unique validation in the future and able to show context sensitive error message)
"The child and parent table may be the same table, i.e. the foreign key refers back to the same table. Such a foreign key is known in SQL:2003 as a self-referencing or recursive foreign key." (Source: http://en.wikipedia.org/wiki/Foreign_key)
created a unique index and assigned a message for the index
When the uniqueness is broken the selected message is not shown.
the constraint creation must have "DEFERRABLE INITIALLY DEFERRED" at the end
I mean, when creating a constraint is executing this sql for example:
it must be
1. DEFERRABLE INITIALLY DEFERRED clause, Fixed.
2. Error message for unique index work if the index name is the same as what's in the database. To avoid any typo issue, you can use the Create Table Index process to extract the name and index column from database.
Thanks Heng Sin.
It was caused because the spanish postgresql message uses a different quoting characters, like this:
I committed a fix