Re: Prefered Types

Alvaro Herrera <alvherre@commandprompt.com>

From: Alvaro Herrera <alvherre@commandprompt.com>
To: Зотов Роман <zotov@oe-it.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-05-03T20:00:12Z
Lists: pgsql-hackers
Excerpts from Зотов Роман's message of mar may 03 16:31:31 -0300 2011:

> but here we can see problem like
> F(smallint)
> F(integer)
> but call like F(float)
> i wouldn`t like to fail it.

I think this particular example would be a mistake, because that cast
would be lossy, so you want to invoke it only when the user explicitely
selects it.  The other way around would be fine, I think, that is,
F(float)
F(float8)
and the call is F(int)


> PS This patch needet, because in any case we must calc prefer more 
> smartly, yes this patch is 1/10 of full solution, but it`s first step!!!

Well, if the other 9/10 were clear, there would be no discussion.  The
problem is that the missing bits have not been designed and thus we
don't know if this 1/10 will be useful to them.  We need to find a
complete design before committing to any initial portion which may turn
out to be bogus down the road.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support