Search Postgresql Archives

text field constraint advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux