Re: Implicit casts to text

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Implicit casts to text
Дата
Msg-id 200704021740.22663.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: Implicit casts to text  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Implicit casts to text  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Implicit casts to text  (Josh Berkus <josh@agliodbs.com>)
Список 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 по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Statistics on views (execute a plan from within analyze)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: One-time plans