On Sat, Jul 02, 2005 at 05:20:29PM +0100, Greg Steffensen wrote:
Quote:
I'm storing SVG files, which can be many kilobytes long, in a text field.
When I try to add a unique contraint to that field, or try to add a row to a
table that already has had the unique contraint applied, I get errors like
the following:
ERROR: index row requires 15528 bytes, maximum size is 8191
Evidently, the unique constraint creates an index, but the index can't
handle large field sizes. |
Yes, that's a known limitation -- you cannot store arbitrarily large
fields in an index. Even if it was possible I don't think it'd be a
good idea from an efficiency POV. You may want to create an index in a
digested version of the file instead (SHA-1, say, or MD5).
--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"El conflicto es el camino real hacia la unión"
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend