Re: Patch for 8.5, transformationHook

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Jeff Davis" <pgsql(at)j-davis(dot)com>
Subject: Re: Patch for 8.5, transformationHook
Date: 2009-08-10 16:57:42
Message-ID: 12390.1249923462@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> reimplement a bunch of core functionality like COALESCE

> If such an effort could reduce the astonishment factor for the
> following, it would justify a certain amount of effort, in my view:

> test=# select pg_typeof('x');
> pg_typeof
> -----------
> unknown
> (1 row)

> test=# select pg_typeof(null);
> pg_typeof
> -----------
> unknown
> (1 row)

> test=# select pg_typeof(coalesce(null, null));
> pg_typeof
> -----------
> text
> (1 row)

The astonishment factor there has nothing to do with how the behavior is
inserted into the parser; it's a property of our type resolution rules.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2009-08-10 17:08:15 Re: hot standby - merged up to CVS HEAD
Previous Message Kevin Grittner 2009-08-10 16:54:23 Re: Patch for 8.5, transformationHook