Re: char(n) to varchar or text conversion should strip - Mailing list pgsql-hackers

From Tom Lane
Subject Re: char(n) to varchar or text conversion should strip
Date
Msg-id 930.1037645675@sss.pgh.pa.us
Whole thread Raw
In response to Re: char(n) to varchar or text conversion should strip  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Hmm ... now that's an interesting thought.  So the input converter would
>> actively strip trailing blanks, output would add them back,

> But how would the output know how many to put back?

The output routine would need access to the column typmod.  Which it
would have, in simple "SELECT columnname" cases, but this is a serious
weakness of the scheme in general.  See my followup post of a few
minutes ago.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: char(n) to varchar or text conversion should strip trailing spaces
Next
From: "Marc G. Fournier"
Date:
Subject: Final Release Scheduale ...