Re: Converting char to varchar automatically

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Melvin Davidson <melvin6925(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting char to varchar automatically
Date: 2014-10-07 19:28:04
Message-ID: CAL_0b1u3Gxx+1DP891FSu7cSSPz82TucjBCDssGfyxa1r=LSyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 7, 2014 at 11:02 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Roughly speaking it's the pairs that have a binary (WITHOUT FUNCTION)
> coercion according to pg_cast, although we have special logic for a few
> cases such as varchar(M) -> varchar(N).

That ones?

select t1.typname, t2.typname
from pg_cast, pg_type as t1, pg_type as t2
where
t1.oid = castsource and t2.oid = casttarget and
castmethod = 'b' order by 1, 2;

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979
gray(dot)ru(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Vanasco 2014-10-07 23:44:30 index behavior question - multicolumn not consulted ?
Previous Message israel 2014-10-07 19:06:07 Re: Processor usage/tuning question