I have done my tests too and it worked... I think this is a thing to put
in the FAQ or in some other place... This will help all persons who have
to convert "textual" types between them without dropping and recreating
tables, indexes, etc...
Thank you for your help...
--
Doct. Eng. Denis Gasparin: denis@edistar.com
---------------------------
Programmer & System Administrator - Edistar srl
Il mar, 2002-03-26 alle 18:29, Tom Lane ha scritto:
> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > If you were using varchar, this would be fine. With char, you have
> > issues with the padding spaces if you ever convert them to text
> > (for example using lower or upper).
>
> But you could do
> update foo set mycol = mycol || '';
> after tweaking the atttypmod as Stephan illustrates. That should force
> all the values to the correct length. (The dummy concatenation is just
> to prevent the system from optimizing away the length coercion step.)
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)