Re: Unnecessary casts in pg_cast - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unnecessary casts in pg_cast
Date
Msg-id 17480.1194971478@sss.pgh.pa.us
Whole thread Raw
In response to Unnecessary casts in pg_cast  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Why do we need assignment casts from cidr, inet, bool, and xml to
> text?

Because these cast conversion functions act differently from the datatype
output functions, eg

regression=# select true;bool 
------t
(1 row)

regression=# select true::text;text 
------true
(1 row)

        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jignesh K. Shah"
Date:
Subject: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris
Next
From: Heikki Linnakangas
Date:
Subject: Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris