Eli Mesika has posted comments on this change. Change subject: core : Introduce engine_sessions table and DAO ......................................................................
Patch Set 3: (3 comments) http://gerrit.ovirt.org/#/c/35148/3/packaging/dbscripts/engine_sessions_sp.sql File packaging/dbscripts/engine_sessions_sp.sql: Line 25: Line 26: END; $procedure$ Line 27: LANGUAGE plpgsql; Line 28: Line 29: Create or replace FUNCTION GetEngineSessionBySessionId(v_engine_session_id VARCHAR(255)) RETURNS SETOF engine_sessions STABLE When you get by the PK you don't need to include it in the name .... Line 30: AS $procedure$ Line 31: BEGIN Line 32: RETURN QUERY SELECT * Line 33: FROM engine_sessions Line 49: Line 50: END; $procedure$ Line 51: LANGUAGE plpgsql; Line 52: Line 53: Create or replace FUNCTION DeleteEngineSessionBySessionId(v_engine_session_id VARCHAR(255)) When you delete by the PK you don't need to include it in the name .... Line 54: RETURNS integer Line 55: AS $procedure$ Line 56: DECLARE Line 57: deleted_rows int; http://gerrit.ovirt.org/#/c/35148/3/packaging/dbscripts/upgrade/03_06_0560_add_engine_sessions.sql File packaging/dbscripts/upgrade/03_06_0560_add_engine_sessions.sql: Line 1: CREATE SEQUENCE engine_session_seq INCREMENT BY 1 START WITH 1; Line 2: Line 3: CREATE TABLE engine_sessions ( Line 4: id bigint DEFAULT nextval('engine_session_seq'::regclass) NOT NULL, Line 5: engine_session_id character varying(255) NOT NULL, > please at least 512 If that can be not enough, I prefer text, PG performs very well with text type columns Line 6: user_id uuid NOT NULL, Line 7: user_name character varying(255) NOT NULL, Line 8: group_ids text, Line 9: role_ids text, -- To view, visit http://gerrit.ovirt.org/35148 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b4d9cfc3edc6084fc0436ecfd09c82d5ae57f5e Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@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