Since almost every cast to "text" is implicit, then I believe so should

inet -> text
macaddr -> text
int4 -> varchar
int8 -> varchar

which are currently not.

-- 
Peter Eisentraut   peter_e@gmx.net


Sat, 14 Sep 2002 00:37:28 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Inconsistent casts
Peter Eisentraut dijo: 

> Since almost every cast to "text" is implicit, then I believe so should
> 
> inet -> text
> macaddr -> text
> int4 -> varchar
> int8 -> varchar
> 
> which are currently not.

Also, some casts seem to be missing; numeric -> text, for example.

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"La naturaleza, tan fragil, tan expuesta a la muerte... y tan viva"


Fri, 13 Sep 2002 19:22:06 -0400 (CLT)
Alvaro Herrera <alvherre@atentus.com>
Re: Inconsistent casts
Peter Eisentraut <peter_e@gmx.net> writes:
> Since almost every cast to "text" is implicit, then I believe so should
> inet -> text
> macaddr -> text
> int4 -> varchar
> int8 -> varchar
> which are currently not.

I would like to see us *eliminate* implicit casts to text.  Not add more.

See my prior rants on subject... but the core of the matter is that if
every datatype can be implicitly casted to text then you have no type
safety worthy of the term.  We have open bug reports that reduce to this.

			regards, tom lane

Fri, 13 Sep 2002 22:57:24 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Inconsistent casts 