Re: stupid patch of pg_dumplo

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: andrea gelmini <bungle(at)linux(dot)it>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: stupid patch of pg_dumplo
Date: 2001-11-08 13:32:27
Message-ID: 20011108143227.K26253@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Thu, Nov 08, 2001 at 01:52:47PM +0100, andrea gelmini wrote:
> hi all,
> i would like to se this patch applied, because i often use
> pg_dumplo, and i need to set the port number of the server to contact.

It's good idea, maybe you can try add other values usable in
PQsetdbLogin.

> anyway, i don't have C language skill, so be careful with these
> lines... they work for me, but...

Please use other code in pg_dumplo/main.c as inspiration.

If you want add "port" add it to pgLO struct (see pg_dumplo.h) and
fill this value like others in this sources.

> case 's':
> pgLO->space = strdup(optarg);
> break;
> + case 'o':
> + pgport = optarg;
> + break;

rather:
case 'o':
pgLO->port = strdup(optarg);
break;

> ! pgLO->conn = PQsetdbLogin(pgLO->host, pgport, NULL, NULL, pgLO->db,
> pgLO->user, pwd);

rather:

pgLO->conn = PQsetdbLogin(pgLO->host, pgLO->port, NULL, NULL, pgLO->db,
pgLO->user, pwd);

Please correct your patch and I mean will no problem add it to
official code.

Thanks

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-11-08 13:44:50 Re: Query preformence
Previous Message andrea gelmini 2001-11-08 12:52:47 stupid patch of pg_dumplo