Re: WIP: Range Types - Mailing list pgsql-hackers

From Robert Haas
Subject Re: WIP: Range Types
Date
Msg-id AANLkTik6MT_xTZEsemDK+pbdCurbXKngONTRuSZ_iR6x@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Range Types  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: WIP: Range Types  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Sun, Jan 9, 2011 at 4:03 AM, Jeff Davis <pgsql@j-davis.com> wrote:
> It also might be worth figuring out why input functions get the type oid
> and output functions do not. I see this comment above getTypeIOParam():
>
>  * As of PostgreSQL 8.1, output functions receive only the value
> itself
>  * and not any auxiliary parameters, so the name of this routine is
> now
>  * a bit of a misnomer ... it should be
> getTypeInputParam.
>
> So, why was it eliminated?

Good question.  The relevant commit is here:

commit 6c412f0605afeb809014553ff7ad28cf9ed5526b
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Sun May 1 18:56:19 2005 +0000
   Change CREATE TYPE to require datatype output and send functions to have   only one argument.  (Per recent
discussion,the option to accept multiple   arguments is pretty useless for user-defined types, and would be a likely
sourceof security holes if it was used.)  Simplify call sites of   output/send functions to not bother passing more
thanone argument. 

...but I don't understand the motivation behind it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: reviewers needed!
Next
From: Florian Pflug
Date:
Subject: Re: pg_depend explained