Eli Mesika has posted comments on this change.

Change subject: engine : Entity and DAO changes for Disk provisioning
......................................................................


Patch Set 2:

(5 comments)

https://gerrit.ovirt.org/#/c/39704/2/packaging/dbscripts/storage_device_sp.sql
File packaging/dbscripts/storage_device_sp.sql:

Line 2:  Stored procedures for database operations on Storage Device
Line 3:  related table: storage_device
Line 4: ----------------------------------------------------------------*/
Line 5: 
Line 6: Create or replace FUNCTION InsertStorageDevice(v_id UUID,
see my comments for the varchar sizes in the upgrade script code
Line 7:                                                v_name VARCHAR(1000),
Line 8:                                                v_device_uuid 
VARCHAR(38),
Line 9:                                                v_filesystem_uuid 
VARCHAR(38),
Line 10:                                                v_vds_id UUID,


https://gerrit.ovirt.org/#/c/39704/2/packaging/dbscripts/upgrade/03_05_1360_add_storage_device_tables.sql
File packaging/dbscripts/upgrade/03_05_1360_add_storage_device_tables.sql:

Line 1: -- Add storage_device table
Line 2: CREATE TABLE storage_device
Line 3: (
Line 4:     id UUID NOT NULL,
Line 5:     name VARCHAR(1000) NOT NULL,
I prefer text here
Past shows clearly that such large texts exceeds the limit in some 
installations and this will occur sooner or later
Postgres treats such overflows as exceptions and will not truncate the value to 
the max size as other RDBMS do... 
rule of thumb : for more than 255 chars prefer text unless you know for sure 
that the size is a constant X and then you should use char and not varchar
Line 6:     device_uuid VARCHAR(38),
Line 7:     filesystem_uuid VARCHAR(38),
Line 8:     vds_id UUID NOT NULL,
Line 9:     description VARCHAR(2000),


Line 5:     name VARCHAR(1000) NOT NULL,
Line 6:     device_uuid VARCHAR(38),
Line 7:     filesystem_uuid VARCHAR(38),
Line 8:     vds_id UUID NOT NULL,
Line 9:     description VARCHAR(2000),
same
Line 10:     device_type VARCHAR(50),
Line 11:     device_path VARCHAR(4096),
Line 12:     filesystem_type VARCHAR(50),
Line 13:     mount_point VARCHAR(4096),


Line 7:     filesystem_uuid VARCHAR(38),
Line 8:     vds_id UUID NOT NULL,
Line 9:     description VARCHAR(2000),
Line 10:     device_type VARCHAR(50),
Line 11:     device_path VARCHAR(4096),
same
Line 12:     filesystem_type VARCHAR(50),
Line 13:     mount_point VARCHAR(4096),
Line 14:     size BIGINT,
Line 15:     is_free BOOLEAN,


Line 9:     description VARCHAR(2000),
Line 10:     device_type VARCHAR(50),
Line 11:     device_path VARCHAR(4096),
Line 12:     filesystem_type VARCHAR(50),
Line 13:     mount_point VARCHAR(4096),
same
Line 14:     size BIGINT,
Line 15:     is_free BOOLEAN,
Line 16:     _create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT 
LOCALTIMESTAMP,
Line 17:     _update_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT 
LOCALTIMESTAMP,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie95a12239429dd0c7f3282161221e8b8f639cee9
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
Gerrit-Owner: Ramesh N <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Ramesh N <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to