Re: printTable API (was: Show INHERIT in \du) - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: printTable API (was: Show INHERIT in \du)
Date
Msg-id 20080507215543.GR20150@alvh.no-ip.org
Whole thread Raw
In response to Re: printTable API (was: Show INHERIT in \du)  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: printTable API (was: Show INHERIT in \du)
List pgsql-patches
Brendan Jurd escribió:

> On Thu, Apr 17, 2008 at 7:27 AM, Alvaro Herrera  wrote:

> >  Thanks.  I looked the patch over and did some minor changes.  Modified
> >  version attached.
>
> Cool, I had a look through your changes and they all seemed fine to
> me.  In particular, moving the header comments to the ... header ...
> file seemed like a smart move. =)

FWIW I just noticed something else.  With this patch we add pg_strdup
calls into print.c.  pg_strdup lives in common.c.

This is fine as psql is concerned, but we have another problem which is
that in bin/scripts there are two programs that want to use
printQuery().  The problem is that there's no pg_strdup there :-(

The easy solution is to add pg_strdup to bin/scripts/common.c, but there
we don't have a global progname, so the error report in the out of
memory case cannot carry the name of the program crashing.

I don't like that, but I don't see any other solution.  Ideas welcome.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] bug in numeric_power() function
Next
From: Greg Smith
Date:
Subject: Re: [GENERAL] pgbench not setting scale size correctly?