Skip site navigation (1) Skip section navigation (2)

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

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 thearg
Date: 2011-12-12 08:29:22
Message-ID: E1Ra1GE-0004dr-UF@gemulon.postgresql.org (view raw or flat)
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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8409b60476a4112e654d1a5099dd67a54f197afd

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

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2011-12-12 08:29:23
Subject: pgsql: Revert the behavior of inet/cidr functions to not unpack thearg
Previous:From: Andrew DunstanDate: 2011-12-10 23:19:13
Subject: pgsql: Miscellaneous cleanup to silence compiler warnings seen onMingw

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group