Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Дата
Msg-id CAKFQuwZ2t2m2=M_sJrMfGKjy4LeoYuL0rGBojRXvxB9qh8P3gg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)  (Rui DeSousa <rui@crazybean.net>)
Ответы Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Список pgsql-admin
On Tue, Apr 28, 2020 at 5:21 PM Rui DeSousa <rui@crazybean.net> wrote:
I just use "text" for everything. It's less typing. :-)
Ugh, I see it as sign that the designers of the schema didn’t fully think about the actual requirements or care about them and it usually shows.    

There are very few situations where a non-arbitrary free-form text field is going to have a non-arbitrary length constraint - that is also immutable.  Generally, spending time to figure out those rare exceptions is wasted effort better spent elsewhere.  They are also mostly insufficient when used for their typical "protection" purpose.  If you really want protection add well thought out constraints.

Its less problematic now that increasing the generally arbitrary length doesn't require a table rewrite but you still need to rebuild dependent objects.

David J.

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

Предыдущее
От: Rui DeSousa
Дата:
Сообщение: Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Следующее
От: Rui DeSousa
Дата:
Сообщение: Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)