Re: String concatenation operator which keeps trailing spaces in CHAR(n) columns - Mailing list pgsql-general

From Andrus
Subject Re: String concatenation operator which keeps trailing spaces in CHAR(n) columns
Date
Msg-id EB622EF0AECB4B81B3CDA62C1ACF1F32@dell2
Whole thread Raw
In response to Re: String concatenation operator which keeps trailing spaces in CHAR(n) columns  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
Hi,

>hm, why do that at all?   how about avoid the char() type and create
>views over tables using rpad when you want space padding:
>create view v_foo as
>  select *, rpad(f, 50, ' ') as f_padded;

I'm creating a converter which converts Visual FoxPro expressions to
Postgres at runtime.
FoxPro expression a+b  produces trailing spaces after a  .
To get same result I need to + or other operator with this behaviour.

Andrus.



pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: What query currently running within function
Next
From: Kevin Grittner
Date:
Subject: Re: User-defined operator function: what parameter type to use for uncast character string?