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

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: printTable API (was: Show INHERIT in \du)
Date: 2008-03-30 16:06:59
Message-ID: 47EFBAA3.3060402@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Brendan Jurd wrote:
> 1. describe malloc's the cells to zero, but print just does a local
> calloc without any initialisation.

Um, calloc is the same as malloc + zero. Those two seem identical to me.

> 2. describe only does an mbvalidate for WIN32, but print does it in all cases.

There's this comment in describe.c:

> /*
> * mbvalidate() is used in function describeOneTableDetails() to make sure
> * all characters of the cells will be printed to the DOS console in a
> * correct way
> */

I don't know what that's about. Perhaps there's something in the archives...

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-30 16:16:46 Re: printTable API (was: Show INHERIT in \du)
Previous Message PFC 2008-03-30 14:41:51 Re: first time hacker ;) messing with prepared statements

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-03-30 16:16:46 Re: printTable API (was: Show INHERIT in \du)
Previous Message Andreas 'ads' Scherbaum 2008-03-30 10:49:17 Re: create language ... if not exists