text field constraint advice

From: Dale Sykora <dalen(at)czexan(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: text field constraint advice
Date: 2005-01-26 06:27:17
Message-ID: 41F73845.6010606@czexan.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PostgreSQL users,
I would like to use a text field in a table and limit the size to
reduce the chance of denial-of-service/buffer overflow/etc. I assume I
can define table fields similar to the following
"field_name text check (len(field) < 160)" although my syntax is
probably wrong. Is checking text length considered a good idea? If so,
what would be a reasonable limit? I was thinking about 10 *
average_field_char_length (if avg value is 16 char, set limit to 160
char). Thanks in advance for your opinions.

Thanks,

Dale

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robby Russell 2005-01-26 06:28:17 Re: Good PostgreSQL Based Shopping Cart Software ... ?
Previous Message Marc G. Fournier 2005-01-26 04:46:48 Good PostgreSQL Based Shopping Cart Software ... ?