Re: String concatenation operator which keeps trailing spaces in CHAR(n) columns

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: String concatenation operator which keeps trailing spaces in CHAR(n) columns
Date: 2014-07-31 13:24:04
Message-ID: EB622EF0AECB4B81B3CDA62C1ACF1F32@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2014-07-31 13:46:49 Re: User-defined operator function: what parameter type to use for uncast character string?
Previous Message Merlin Moncure 2014-07-31 13:18:45 Re: What query currently running within function