From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Code and docs review for multiple -c and -f options in psql. |
Date: | 2015-12-14 02:16:04 |
Message-ID: | CAB7nPqStBL6=Afs2J1zD+YurHnSnK6mgXbprUo5RBq0SRNP63A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Mon, Dec 14, 2015 at 4:52 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Code and docs review for multiple -c and -f options in psql.
>
> Commit d5563d7df94488bf drew complaints from Coverity, which quite
> correctly complained that one copy of each -c or -f string was being
> leaked. What's more, simple_action_list_append was allocating enough space
> for still a third copy of each string as part of the SimpleActionListCell,
> even though that coding method had been superseded by a separate strdup
> operation. There were some other minor coding infelicities too. The
> documentation needed more work as well, eg it forgot to explain that -c
> causes psql not to accept any interactive input.
- cell = (SimpleActionListCell *)
- pg_malloc(offsetof(SimpleActionListCell, val) + vallen + 1);
Thanks! Among all those things this bit is a bit shameful..
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-12-14 02:16:39 | Re: pgsql: Code and docs review for multiple -c and -f options in psql. |
Previous Message | Tom Lane | 2015-12-13 19:52:13 | pgsql: Code and docs review for multiple -c and -f options in psql. |