Moti Asayag has posted comments on this change.

Change subject: engine-core: adding general function to db for create constraint
......................................................................


Patch Set 3: (2 inline comments)

....................................................
File backend/manager/dbscripts/common_sp.sql
Line 127:     if not exists (select constraint_name
it's a matter of taste, but I'd prefer the 'select 1' instead of select of 
specific column to emphasize only the existence check.

Line 130:         execute v_constraint_sql;
I think this could be overloaded to support various constraint type:
not null is valid for a single column, therefore its validation should look 
different.

perhaps it is possible to replace the v_constraint_sql with a portion os the 
statement refers to the constraint only since table name and constraint name 
are already provided:

ALTER TABLE v_table ADD CONSTRAINT v_constraint v_constraint_sql

and constraint on a column level which requires a new finction

--
To view, visit http://gerrit.ovirt.org/260
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie66ffcafce17634bbfcf9ea9233706cba46bde81
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to