Skip site navigation (1) Skip section navigation (2)

Re: printTable API (was: Show INHERIT in \du)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: printTable API (was: Show INHERIT in \du)
Date: 2008-05-07 21:55:43
Message-ID: 20080507215543.GR20150@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

Responses

pgsql-hackers by date

Next:From: David FetterDate: 2008-05-07 22:04:49
Subject: Auto-updated fields
Previous:From: David FetterDate: 2008-05-07 21:52:08
Subject: Table inheritance surprise

pgsql-patches by date

Next:From: Greg SmithDate: 2008-05-07 22:07:07
Subject: Re: [GENERAL] pgbench not setting scale size correctly?
Previous:From: Tom LaneDate: 2008-05-07 21:43:52
Subject: Re: [HACKERS] bug in numeric_power() function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group