Re: Unnecessary casts in pg_cast

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unnecessary casts in pg_cast
Date: 2007-11-13 16:31:18
Message-ID: 17480.1194971478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-13 16:32:01 Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris
Previous Message Jignesh K. Shah 2007-11-13 16:01:21 LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris