Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group