Re: BUG #1748: Unique contraints cannot be added to long text fields
В списке pgsql-bugs по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: BUG #1748: Unique contraints cannot be added to long text fields |
| Дата | |
| Msg-id | 20050703160905.GA15445@surnet.cl обсуждение |
| Ответ на | BUG #1748: Unique contraints cannot be added to long text fields ("Greg Steffensen" <greg.steffensen@gmail.com>) |
| Список | pgsql-bugs |
On Sat, Jul 02, 2005 at 05:20:29PM +0100, Greg Steffensen wrote: > 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"
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера