Re: implicit casting bug or feature? - Mailing list pgsql-general

From Tom Lane
Subject Re: implicit casting bug or feature?
Date
Msg-id 2681.1195140812@sss.pgh.pa.us
Whole thread Raw
In response to implicit casting bug or feature?  (Kristo Kaiv <kristo.kaiv@skype.net>)
List pgsql-general
Kristo Kaiv <kristo.kaiv@skype.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

pgsql-general by date:

Previous
From: Dave Page
Date:
Subject: Re: Compiled debugger plug in for windows, any one have it?
Next
From: "Pau Marc Munoz Torres"
Date:
Subject: moving from mysql to postgree