Re: convert char to varchar

Поиск
Список
Период
Сортировка
От Peter Koczan
Тема Re: convert char to varchar
Дата
Msg-id 4544e0330710180835h70aae76cm149bb671fed086ae@mail.gmail.com
обсуждение исходный текст
Ответ на convert char to varchar  (Kostis Mentzelos <mentzelos@gmx.net>)
Ответы Re: convert char to varchar  ("Peter Koczan" <pjkoczan@gmail.com>)
Список pgsql-admin
> Is there any other way to clear trailing spaces when I restore the table?

If you're running 8.x, you can do this in place:

ALTER TABLE c1 ALTER COLUMN name varchar(20) USING rtrim(name), ALTER
COLUMN date varchar(20) USING rtrim(date);

This could take a long time if the table is large or has a lot of indexes on it.

Peter

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Walfred Tedeschi"
Дата:
Сообщение: Replication advice Many-to-one Slony
Следующее
От: "Peter Koczan"
Дата:
Сообщение: Re: convert char to varchar