[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH 06/11] cri-getconfig: Provide get_psql_cmd and get_pgdump_cmd



On Fri, 2015-12-04 at 19:35 +0000, Ian Jackson wrote:
> This is for (non-standalone-mode) shell scripts which want to access
> the postgresql database.
> 
> get_psql_command provides `-v ON_ERROR_STOP' because it is not the
> default (!) and no sane caller would not want it.
> 
> No callers as yet.
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

(one query below)

> ---
> Âcri-getconfig |ÂÂÂ31 +++++++++++++++++++++++++++++++
> Â1 file changed, 31 insertions(+)
> 
> diff --git a/cri-getconfig b/cri-getconfig
> index ee1cc40..48528b5 100644
> --- a/cri-getconfig
> +++ b/cri-getconfig
> @@ -40,6 +40,37 @@ getrepos() {
> Â     echo $repos
> Â}
> Â
> +get_psql_cmd () {
> +     perl -we '
> +     use Osstest;
> +     use Osstest::Executive;
> +     use DBI;
> +     csreadconfig();
> +     print "psql",
> +     ÂÂÂÂÂ" -d ", $dbh_tests->{pg_db},
> +     ÂÂÂÂÂ" -h ", $dbh_tests->{pg_host},
> +     ÂÂÂÂÂ" -p ", $dbh_tests->{pg_port},
> +     ÂÂÂÂÂ" -U ", $dbh_tests->{pg_user},

I suppose none of those can (or at least should) contain any weird quote-
requiring chars etc?

> Â# Good grief, handling background proceesses from shell is a pain.

I just spotted a typo here "proceesses".

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.