From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Rui DeSousa <rui(at)crazybean(dot)net> |
Cc: | raf <raf(at)raf(dot)org>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length) |
Date: | 2020-04-29 00:34:00 |
Message-ID: | CAKFQuwZ2t2m2=M_sJrMfGKjy4LeoYuL0rGBojRXvxB9qh8P3gg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On Tue, Apr 28, 2020 at 5:21 PM Rui DeSousa <rui(at)crazybean(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Rui DeSousa | 2020-04-29 00:40:57 | Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length) |
Previous Message | Rui DeSousa | 2020-04-29 00:20:53 | Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length) |
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Fan | 2020-04-29 00:34:59 | Re: [PATCH] Keeps tracking the uniqueness with UniqueKey |
Previous Message | David Rowley | 2020-04-29 00:29:20 | Re: [PATCH] Keeps tracking the uniqueness with UniqueKey |