Re: pad column with leading zeros or space - Mailing list pgsql-general

From Tom Lane
Subject Re: pad column with leading zeros or space
Date
Msg-id 3226.1011804663@sss.pgh.pa.us
Whole thread Raw
In response to pad column with leading zeros or space  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> I am trying to create a table where I need to pad certain
> columns.  ...

> Yeah, well, I don't know why a delimited format wouldn't
> help the clients, but it seems that they've hardcode
> their process so that the text dump will look *exactly*
> as specified.

Rather than hacking the database representation into some unnatural
choice of datatypes, I'd suggest you keep the table declaration clean
and work on producing the requested output format during the dump.
A simple sed, awk, or Perl script to postprocess a dump file might
well be the cleanest answer.

            regards, tom lane

pgsql-general by date:

Previous
From: Dmitry Alyabyev
Date:
Subject: Re: Permissions on non-owned database
Next
From:
Date:
Subject: Re: postgresql 7.2b5 and vserver: statistics sockets