Re: char(n) to varchar or text conversion should strip

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: char(n) to varchar or text conversion should strip
Date: 2002-11-18 18:54:35
Message-ID: 930.1037645675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-11-18 19:10:32 Final Release Scheduale ...
Previous Message Tom Lane 2002-11-18 18:42:38 Re: char(n) to varchar or text conversion should strip trailing spaces