Re: oid2name cleanup

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: oid2name cleanup
Date: 2002-02-25 04:08:27
Message-ID: 200202250408.g1P48Rt04351@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Neil Conway wrote:
> Currently, contrib/oid2name doesn't bother to free() the memory that it
> malloc()'s. This isn't too serious (because oid2name is a short-lived
> utility, so the memory will soon be returned to the OS on process
> termination), but I still think it's poor style.
>
> This patch changes oid2name so that it allocates memory on the stack
> where possible and free()s the remaining heap-allocated memory. The
> patch also fixes a typo a comment and adds 'const' qualifiers to a few
> 'char *' function parameters.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilconway(at)rogers(dot)com>
> PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-02-25 04:19:17 Re: Locale support for postgresql regex (src)
Previous Message Bruce Momjian 2002-02-25 03:55:54 Re: guc