> Bruce Momjian writes:
>
> > Patch applied. I removed the reference to asprintf() and changed it to
> > a string constant. I have also added documentation changes. Patch
> > attached.
>
> I think there's a memory leak, count your xmalloc's. Also, perhaps the
I thought I had too many mallocs, but when I started looking, I couldn't
find the second one anymore. I see it now, and fixed. Looped through
cell and free'ed:
for (i = 0; i < PQntuples(res); i++)
free(cells[i * cols + 2]);
free(cells);
> user ids should be right-aligned (printTable, 5th argument).
Got it:
test=> \du
List of Users
User Name | User ID | Attributes
-----------+---------+------------------------
demouser2 | 140 | create DB
postgres | 139 | create user, create DB
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026