André Schenk
-
2010-10-05
Postgres has a limitation how many characters an indexed table column may have. Trying to write a value larger than this maximum value leads to:
psql:test:375: ERROR: index row size 3104 exceeds maximum 2712 for index "t"
HINT: Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.
One solution would be to truncate all value to a certain length before writing it into the database. Attached you can find a diff against GenericDatabaseAdaptor.java which does this.
Best regards,
André