Eli Mesika has posted comments on this change. Change subject: engine: Adding a helper function to check if table exists ......................................................................
Patch Set 1: (4 comments) http://gerrit.ovirt.org/#/c/37421/1/packaging/dbscripts/create_functions.sql File packaging/dbscripts/create_functions.sql: function should be in common_sp.sql Line 1: -- Constraint is not used dropping it to clean the dependency before dropping the function. Line 2: ---------------------------------- Line 3: -- create functions -- Line 4: ---------------------------------- Line 24: namespace character varying(2048), Line 25: authz character varying(255) Line 26: ); Line 27: Line 28: CREATE OR REPLACE FUNCTION fn_table_exists (v_table varchar(64)) returns boolean STABLE please rename to fn_db_is_table_exists Line 29: AS $procedure$ Line 30: declare Line 31: retvalue boolean; Line 32: BEGIN Line 30: declare Line 31: retvalue boolean; Line 32: BEGIN Line 33: retvalue := EXISTS ( Line 34: SELECT * FROM information_schema.tables WHERE table_schema = 'public' AND table_name = v_table please remve TABs (only 4 spaces alignment ...) Line 35: ); Line 36: return retvalue; Line 37: END; $procedure$ Line 38: LANGUAGE plpgsql; Line 34: SELECT * FROM information_schema.tables WHERE table_schema = 'public' AND table_name = v_table Line 35: ); Line 36: return retvalue; Line 37: END; $procedure$ Line 38: LANGUAGE plpgsql; please remove TWS Line 39: Line 40: Line 41: CREATE OR REPLACE FUNCTION getGlobalIds(v_name VARCHAR(4000)) Line 42: RETURNS UUID IMMUTABLE STRICT -- To view, visit http://gerrit.ovirt.org/37421 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9421526de442640cf985cb0302f7fa3d6daa909a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches