Alon Bar-Lev has posted comments on this change.

Change subject: db: cleanup: psql usage
......................................................................


Patch Set 5:

(3 comments)

http://gerrit.ovirt.org/#/c/24885/5/packaging/dbscripts/create_schema.sh
File packaging/dbscripts/create_schema.sh:

Line 22
Line 23
Line 24
Line 25
Line 26
> def. ${DBFUNC_MD5DIR}
Done


Line 40: done
Line 41: 
Line 42: echo "user name is: '${DBFUNC_DB_USER}'"
Line 43: 
Line 44: dbfunc_psql_statement "create language 'plpgsql';" > /dev/null
> Perhaps not '> /dev/null' (also in tens of other places, nvm for now)? Perh
1. > /dev/null I do not care much if we put it all over with output is not 
required, we can have different function to do that, not sure it worth it.

2. this error if already exists is not something that we fail so I do not think 
the extra complexity is required.

3. not call createlang as we have our psql wrapper with all parameters and 
environment intact, I did not want to wrap yet another utility that does not 
add anything productive.
Line 45: 
Line 46: #set database min error level
Line 47: dbfunc_psql_statement_die "ALTER DATABASE \"${DBFUNC_DB_DATABASE}\" 
SET client_min_messages=ERROR;" > /dev/null
Line 48: 


http://gerrit.ovirt.org/#/c/24885/5/packaging/dbscripts/dbfunc-base.sh
File packaging/dbscripts/dbfunc-base.sh:

Line 52:     dbfunc_psql "$@" || die "Cannot execute sql command: $*"
Line 53: }
Line 54: 
Line 55: #
Line 56: # TODO: figure out why we cannot use --command=
> Probably just to avoid quoting issues. Can also use '<<' instead of temp fi
what problem may be in quote?

 "${xxx}"

should pass everything, no?
Line 57: #
Line 58: dbfunc_psql_statement() {
Line 59:     local statement="$1"
Line 60: 


-- 
To view, visit http://gerrit.ovirt.org/24885
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib93ad2ca4d35fe3f44e3f8915182778a9fe6ed66
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yaniv Dary <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[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