pgsql: Revert the behavior of inet/cidr functions to not unpack the arg

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg
Date: 2011-12-12 08:29:23
Message-ID: E1Ra1GF-0004e0-3Y@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Revert the behavior of inet/cidr functions to not unpack the arguments.

I forgot to change the functions to use the PG_GETARG_INET_PP() macro,
when I changed DatumGetInetP() to unpack the datum, like Datum*P macros
usually do. Also, I screwed up the definition of the PG_GETARG_INET_PP()
macro, and didn't notice because it wasn't used.

This fixes the memory leak when sorting inet values, as reported
by Jochen Erwied and debugged by Andres Freund. Backpatch to 8.3, like
the previous patch that broke it.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c1a03230b79f1b90a6b28b2cc8fa27c640a915e5

Modified Files
--------------
src/backend/utils/adt/network.c | 98 +++++++++++++++++++-------------------
src/include/utils/inet.h | 2 +-
2 files changed, 50 insertions(+), 50 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message User Fxjr 2011-12-12 16:27:38 npgsql - Npgsql2: Fixed line endings.
Previous Message Heikki Linnakangas 2011-12-12 08:29:22 pgsql: Revert the behavior of inet/cidr functions to not unpack the arg