Re: Implicit casts to text - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Implicit casts to text
Date
Msg-id 200704021740.22663.peter_e@gmx.net
Whole thread Raw
In response to Re: Implicit casts to text  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Implicit casts to text
Re: Implicit casts to text
List pgsql-hackers
Am Montag, 2. April 2007 09:17 schrieb Tom Lane:
> The scheme that was in the back of my mind was to do this at the same
> time as providing a general facility for casting *every* type to and
> from text, by means of their I/O functions if no specialized cast is
> provided in pg_cast.  This would improve functionality, thus providing
> a salve to the annoyance of users whose code the restriction breaks:
> we can certainly argue that it wouldn't do for all those automatically
> created casts to be implicit.  At the same time it'd let us eliminate
> redundant text-to/from-foo code that's currently in place for some but
> not all datatypes.

That's the first time I hear of such a scheme.  Anyway, the point of this 
exercise is to reduce misbehavior by explicit casting.  I don't see how 
implicitly adding more casting paths helps that or is even related to that.

Even if we had the automatic cast facility that you describe, and I find it 
highly suspicious, such casts could at most be of the explicit category, so 
how would that help users who currently rely on the implicit ones?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Statistics on views (execute a plan from within analyze)
Next
From: Tom Lane
Date:
Subject: Re: One-time plans