Re: convert char to varchar

From: Rodrigo De León <rdeleonp(at)gmail(dot)com>
To: "Kostis Mentzelos" <mentzelos(at)gmx(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: convert char to varchar
Date: 2007-10-18 14:06:26
Message-ID: a55915760710180706i3023f62cub834087e1669f50@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 10/18/07, Kostis Mentzelos <mentzelos(at)gmx(dot)net> wrote:
> Is there any other way to clear trailing spaces when I restore the table?

After you restore, you can do:

UPDATE V1
SET
NAME = TRIM(TRAILING ' ' FROM NAME)
, DATE = TRIM(TRAILING ' ' FROM DATE);

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2007-10-18 14:56:05 Re: Is my database now too big?
Previous Message Kevin Grittner 2007-10-18 14:01:16 Re: Drop Not Null