From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Alex Perel <aperel(at)verticalscope(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: \du in psql patchp |
Date: | 2001-05-09 17:57:19 |
Message-ID: | 200105091757.f49HvJl15666@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
> 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Perel | 2001-05-09 18:01:45 | Re: \du in psql patchp |
Previous Message | Peter Eisentraut | 2001-05-09 17:45:59 | Re: \du in psql patchp |