Re: implicit casting bug or feature?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kristo Kaiv <kristo(dot)kaiv(at)skype(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: implicit casting bug or feature?
Date: 2007-11-15 15:33:32
Message-ID: 2681.1195140812@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kristo Kaiv <kristo(dot)kaiv(at)skype(dot)net> writes:
> During development i stumbled upon a strange behaviour in 8.2.4
> ...
> Why is this still blank padded? Shouldn't a character(20) -> text
> conversion
> happen implicitly when the value is selected into the return type
> that is declared as text?

No, that's not how plpgsql deals with forced type conversions.
Its method is always "run the source type's output function, then
feed that to the destination type's input function". In some cases
that will yield different behavior than a SQL cast.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pau Marc Munoz Torres 2007-11-15 15:44:33 moving from mysql to postgree
Previous Message Dave Page 2007-11-15 15:30:59 Re: Compiled debugger plug in for windows, any one have it?