On Fri, 7 Sep 2001, Tom Lane wrote:

> Andrew Sullivan <[EMAIL PROTECTED]> writes:
> > 1.  I thought the SQL spec required varchar() not to pad.  Is it
> > just that, because of the way pg_dump saved the char() data (as
> > blank-padded) that the varchar() field preserves the padded data?
>
> You could possibly make an argument that trailing blanks in a char()
> column (which ARE known to be padding) should be stripped during dumping,
> primarily for convenience in reloading into varchar columns.  But this
> seems a tad weird and unexpected to me.  An explicit trim() operation
> sounds like a better idea.

Maybe you can modify the pg_dump source to use trim() on the output
columns when given a --trim-char-columns :-)

-- 
Alvaro Herrera (<alvherre[@]atentus.com>)


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to