On Sun, Sep 5, 2010 at 1:05 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Robert Haas <robertmh...@gmail.com> writes:
>> I am not too sure that the distinction between implicit casts and
>> assignment casts is all that useful;
>
> We've been there and done that; it doesn't work.  The current scheme
> was invented specifically because a two-way design didn't work.
>
> http://archives.postgresql.org/pgsql-hackers/2002-09/msg00900.php

Well, sure, if you remove the distinction between implicit and
assignment casts *without doing anything else*, it's not going to
work.  But that's not what I proposed.

And as Peter said in one of his responses: "Finally, I believe this
paints over the real problems, namely the inadequate and hardcoded
type category preferences and the inadequate handling of numerical
constants.  Both of these issues have had adequate approaches proposed
in the past and would solve this an a number of other issues."  I
agree.  We pride ourselves on having an extensible database product,
but our current type system is fairly hostile to extension.  The
typispreferred stuff works OK for deciding between two types (which is
not coincidentally the number of distinct values that can be
represented by a Boolean column) but after that it breaks down pretty
quickly.  If you're adding specialized types to represent zoo animals
or constellations or six-dimensional polyhedra, it works OK, but if
you try to add addition stringy or numbery things, there are problems.

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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to