On 10/18/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote:
On Tue, Oct 17, 2006 at 12:51:19PM -0400, Merlin Moncure wrote:
> so, imo alexander is correct:
> contacto varchar(255)
>
> ...is a false constraint, why exactly 255? is that were the dart landed?

BTW, if we get variable-length varlena headers at some point, then
setting certain limits might make sense to keep performance more
consistent.

I would argue that it is assumptions about the underlying architecture
that got everyone into trouble in the first place :).  I would prefer
to treat length constraint as a constraint (n + 1 = error), unless
there was a *compelling* reason to do otherwise, which currently there
isn't (or hasn't been since we got toast)  a  lot of this stuff s due
to legacy thinking, a lot of dbf products had limts to varchar around
255 or so.

imo, a proper constraint system would apply everything at the domain
level, and minlength and maxlength would get equal weight, and be
optional for all types.

merlin

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to