Re: oid2name cleanup - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: oid2name cleanup
Date
Msg-id 200202250408.g1P48Rt04351@candle.pha.pa.us
Whole thread Raw
In response to oid2name cleanup  (Neil Conway <nconway@klamath.dyndns.org>)
List 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@rogers.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@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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: guc
Next
From: Bruce Momjian
Date:
Subject: Re: Locale support for postgresql regex (src)