pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Code and docs review for multiple -c and -f options in psql.
4+ messages / 3 participants
[nested] [flat]
* pgsql: Code and docs review for multiple -c and -f options in psql.
@ 2015-12-13 19:52 Tom Lane <tgl@sss.pgh.pa.us>
2015-12-14 02:16 ` Re: pgsql: Code and docs review for multiple -c and -f options in psql. Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2015-12-13 19:52 UTC (permalink / raw)
To: pgsql-committers
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/fcbbf82d2b6caf7b156f2ec35b322e23caf1e99e
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 140 +++++++++++++++++++++++-----------------
src/bin/psql/startup.c | 93 ++++++++++++--------------
2 files changed, 121 insertions(+), 112 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Code and docs review for multiple -c and -f options in psql.
2015-12-13 19:52 pgsql: Code and docs review for multiple -c and -f options in psql. Tom Lane <tgl@sss.pgh.pa.us>
@ 2015-12-14 02:16 ` Michael Paquier <michael.paquier@gmail.com>
2015-12-14 02:16 ` Re: pgsql: Code and docs review for multiple -c and -f options in psql. Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Paquier @ 2015-12-14 02:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On Mon, Dec 14, 2015 at 4:52 AM, Tom Lane <tgl@sss.pgh.pa.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
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Code and docs review for multiple -c and -f options in psql.
2015-12-13 19:52 pgsql: Code and docs review for multiple -c and -f options in psql. Tom Lane <tgl@sss.pgh.pa.us>
2015-12-14 02:16 ` Re: pgsql: Code and docs review for multiple -c and -f options in psql. Michael Paquier <michael.paquier@gmail.com>
@ 2015-12-14 02:16 ` Michael Paquier <michael.paquier@gmail.com>
2015-12-14 07:07 ` Re: pgsql: Code and docs review for multiple -c and -f options in psql. Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Paquier @ 2015-12-14 02:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On Mon, Dec 14, 2015 at 11:16 AM, Michael Paquier wrote:
> - cell = (SimpleActionListCell *)
> - pg_malloc(offsetof(SimpleActionListCell, val) + vallen + 1);
> Thanks! Among all those things this bit is a bit shameful..
(I am the one at the origin of that FWIW)
--
Michael
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Code and docs review for multiple -c and -f options in psql.
2015-12-13 19:52 pgsql: Code and docs review for multiple -c and -f options in psql. Tom Lane <tgl@sss.pgh.pa.us>
2015-12-14 02:16 ` Re: pgsql: Code and docs review for multiple -c and -f options in psql. Michael Paquier <michael.paquier@gmail.com>
2015-12-14 02:16 ` Re: pgsql: Code and docs review for multiple -c and -f options in psql. Michael Paquier <michael.paquier@gmail.com>
@ 2015-12-14 07:07 ` Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Stehule @ 2015-12-14 07:07 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers
2015-12-14 3:16 GMT+01:00 Michael Paquier <michael.paquier@gmail.com>:
> On Mon, Dec 14, 2015 at 11:16 AM, Michael Paquier wrote:
> > - cell = (SimpleActionListCell *)
> > - pg_malloc(offsetof(SimpleActionListCell, val) + vallen + 1);
> > Thanks! Among all those things this bit is a bit shameful..
>
> (I am the one at the origin of that FWIW)
>
me too
Thank you
Pavel
> --
> Michael
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-12-14 07:07 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-12-13 19:52 pgsql: Code and docs review for multiple -c and -f options in psql. Tom Lane <tgl@sss.pgh.pa.us>
2015-12-14 02:16 ` Michael Paquier <michael.paquier@gmail.com>
2015-12-14 02:16 ` Michael Paquier <michael.paquier@gmail.com>
2015-12-14 07:07 ` Pavel Stehule <pavel.stehule@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox