Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data
Дата
Msg-id CAOR=d=3uQta00FfWwxRUy2ek3rrm30e9SQMJ0KXrAiCP=ShZ8w@mail.gmail.com
обсуждение исходный текст
Ответ на Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data  (Reid Thompson <reid.thompson@ateb.com>)
Ответы Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data  (Gregg Jaskiewicz <gryzman@gmail.com>)
Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data  (Robert Treat <rob@xzilla.net>)
Список pgsql-general
On Tue, Nov 22, 2011 at 7:50 AM, Reid Thompson <reid.thompson@ateb.com> wrote:
> Note that I man­u­ally added the 4 to the desired size of 35..again, for
> some legacy rea­sons inside PG. Done. That's it. Should we check?
>
> d TABLE1
>
> TABLE "public.TABLE1"
> COLUMN  |  TYPE                 | Modifiers
> --------+-----------------------+-----------
> COL1    | CHARACTER VARYING(35) |
>
> Such a sim­ple yet effec­tive trick. Of course it'd be nicer if this is
> some­how included in a more proper way in the data­base, but this does the
> job.

Note that this method works around all the safe guards etc that make
sure your data is safe and coherent.  It works, as long as you're
careful what you're doing.

the real solution, to me, is to stop using varchar limits unless
there's a real reason for them.  I.e. arbitrary limits on things like
name lengths make no sense in the db.

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

Предыдущее
От: Reid Thompson
Дата:
Сообщение: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data
Следующее
От: sunpeng
Дата:
Сообщение: are there any methods to disable updating index before inserting large number tuples?