Re: Problems with Blank space

From: wsheldah(at)lexmark(dot)com
To: "Mitch Vincent" <mvincent(at)cablespeed(dot)com>
Cc: "Eric, Audet" <eaudet(at)scc(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: Problems with Blank space
Date: 2001-08-07 19:52:07
Message-ID: 200108071952.PAA10722@interlock2.lexmark.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Perl to strip trailing whitespace from a variable:
$name =~ s/\s+$//;

"Mitch Vincent" <mvincent%cablespeed(dot)com(at)interlock(dot)lexmark(dot)com> on 08/07/2001
03:26:31 PM

To: "Eric, Audet" <eaudet%scc(dot)ca(at)interlock(dot)lexmark(dot)com>,
pgsql-general%postgresql(dot)org(at)interlock(dot)lexmark(dot)com
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: Re: [GENERAL] Problems with Blank space

Yes, if you're using fixed-length fields then the value is padded out to the
length that the field is fixed to :-)

I'm sure Perl has some facility for stripping NULLs off of strings, I
suggest using it here or changing the data type in PG...

Good luck!!

> I am not sure if this is a database issue or a DBI::Pg issue.
>
> When I do a select * from tablea .... all fields specified as fix length
> text field ... return the data with blank space.
>
> Example:
> "Eric" returns "Eric****************" where * are blank spaces.
>
> Is this normal?
>
> Eric
>

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

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

Browse pgsql-general by date

  From Date Subject
Next Message Michael Widenius 2001-08-07 19:52:36 Re: [Fwd: MySQL Benchmark page - Problem with vacuum() in PostgreSQL]
Previous Message Joe Conway 2001-08-07 19:46:03 Re: Problems with Blank space