Allon Mureinik has posted comments on this change. Change subject: core: Database functions not fully optimized ......................................................................
Patch Set 1: (5 comments) Basically +1, there are a few missing modifiers in create_functions.sql .................................................... File packaging/dbscripts/common_sp.sql Line 197: -------------------------------------------------- Line 198: -- End of DB helper functions Line 199: -------------------------------------------------- Line 200: Line 201: CREATE OR REPLACE FUNCTION isloggingenabled(errorcode text) Unrelated to this patch, but this function is never called, and should be removed. Line 202: RETURNS boolean STABLE AS Line 203: $BODY$ Line 204: -- determine if logging errors is enabled. Line 205: -- define in your postgresql.conf: .................................................... File packaging/dbscripts/create_functions.sql Line 12: CREATE TYPE booleanResultType AS(result BOOLEAN); Line 13: Line 14: Line 15: CREATE OR REPLACE FUNCTION getGlobalIds(v_name VARCHAR(4000)) Line 16: RETURNS UUID IMMUTABLE should also be stict Line 17: AS $function$ Line 18: DECLARE Line 19: v_id UUID; Line 20: BEGIN Line 28: v_id := 'BBB00000-0000-0000-0000-123456789BBB'; Line 29: end if; Line 30: return v_id; Line 31: END; $function$ Line 32: LANGUAGE plpgsql; Is there a difference between having immutable before "as function" or after the language clause, or is this just a styling change? Line 33: Line 34: CREATE OR REPLACE FUNCTION public.fnSplitter(ids TEXT) RETURNS SETOF idTextType IMMUTABLE AS Line 35: $function$ Line 36: BEGIN Line 576: Line 577: -- returns a set of integers representing vm statuses on which the vm shouldn't Line 578: -- be used for quota calculation Line 579: CREATE OR REPLACE FUNCTION getNonCountableQutoaVmStatuses() Line 580: RETURNS SETOF INTEGER STABLE should be immutable. Line 581: AS $BODY$ Line 582: BEGIN Line 583: RETURN query select 0 union select 13 union select 14 union select 15; Line 584: --(Down(0), Suspended(13), ImageIllegal(14), ImageLocked(15)) Line 740: language plpgsql; Line 741: Line 742: -- This function turns a string of IP addresses to an array of IP Line 743: -- addreses, in order to correct sorting. Line 744: CREATE OR REPLACE FUNCTION fn_get_comparable_ip_list(text) RETURNS inet[] IMMUTABLE should also add strict. Line 745: AS $procedure$ Line 746: BEGIN Line 747: CASE Line 748: WHEN ($1 IS NULL) OR ($1 ~ E'^\s*$') THEN -- To view, visit http://gerrit.ovirt.org/17962 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I29a355286f5e6c23afe64c63efefe311c65be581 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches