Eli Mesika has posted comments on this change.

Change subject: core: Vm Icons - backend part
......................................................................


Patch Set 15:

(7 comments)

https://gerrit.ovirt.org/#/c/38600/15/packaging/dbscripts/upgrade/03_06_1260_add_vm_icons_vm_icon_defaults_tables.sql
File 
packaging/dbscripts/upgrade/03_06_1260_add_vm_icons_vm_icon_defaults_tables.sql:

Line 1: CREATE TABLE vm_icons (
Line 2:     id             UUID           NOT NULL,
Line 3:     data_url       VARCHAR(32768) NOT NULL -- 1024 * 32
Line 4: );
Line 5: -- table viewer http://jsfiddle.net/jniederm/u1bf0767/
What is that ???
Should be removed from here IMO
Line 6: 
Line 7: SELECT fn_db_create_constraint('vm_icons',
Line 8:                                'pk_vm_icons',
Line 9:                                'PRIMARY KEY (id)');


Line 6: 
Line 7: SELECT fn_db_create_constraint('vm_icons',
Line 8:                                'pk_vm_icons',
Line 9:                                'PRIMARY KEY (id)');
Line 10: CREATE UNIQUE INDEX vm_icons_data_url_unique_index ON vm_icons( 
md5(data_url) );
What do you want to achieve with this index ? and what is the point of using 
MD5 here ???
Line 11: 
Line 12: CREATE TABLE vm_icon_defaults (
Line 13:     id UUID NOT NULL,
Line 14:     os_id INTEGER NOT NULL,


https://gerrit.ovirt.org/#/c/38600/15/packaging/dbscripts/vm_icons_sp.sql
File packaging/dbscripts/vm_icons_sp.sql:

Line 1: -- table viewer http://jsfiddle.net/jniederm/u1bf0767/
please remove
Line 2: 
Line 3: -- VmIcon vm_icons
Line 4: 
Line 5: --Get{0}By{0}Id


Line 1: -- table viewer http://jsfiddle.net/jniederm/u1bf0767/
Line 2: 
Line 3: -- VmIcon vm_icons
Line 4: 
Line 5: --Get{0}By{0}Id
please remove all those {0} from code
Line 6: Create or replace FUNCTION GetVmIconByVmIconId(v_id UUID) RETURNS SETOF 
vm_icons STABLE
Line 7: AS $procedure$
Line 8: BEGIN
Line 9:     RETURN QUERY


Line 42: 
Line 43: --Update{0}
Line 44: Create or replace FUNCTION UpdateVmIcon(
Line 45:     v_id UUID,
Line 46:     v_data_url VARCHAR(32768)) -- 1024 * 32
please change to text
Line 47:     RETURNS VOID
Line 48: AS $procedure$
Line 49: BEGIN
Line 50:     UPDATE vm_icons


Line 65:     WHERE id = v_id;
Line 66: END; $procedure$
Line 67: LANGUAGE plpgsql;
Line 68: 
Line 69: Create or replace FUNCTION GetVmIconByVmIconDataUrl(v_data_url 
VARCHAR(32768))
text
Line 70:     RETURNS SETOF vm_icons STABLE
Line 71: AS $procedure$
Line 72: BEGIN
Line 73:     RETURN QUERY


Line 188: END; $procedure$
Line 189: LANGUAGE plpgsql;
Line 190: 
Line 191: Create or replace FUNCTION 
GetVmIconDefaultByVmIconDefaultLargeIconId(v_large_icon_id UUID)
Line 192:     RETURNS SETOF vm_icon_defaults
should be STABLE
Line 193: AS $procedure$
Line 194: BEGIN
Line 195:     RETURN QUERY
Line 196:     SELECT *


-- 
To view, visit https://gerrit.ovirt.org/38600
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I98ad0d76285af3b2913e477a340bfd1ac09a296e
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Jakub Niedermertl <jnied...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jnied...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@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

Reply via email to