Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>On the other hand maximum string size has an effect on Postgres indexes: b-tree (the default) will blow up on strings beyond 4k chars, and this is not statically checked by postgres, it will blow up while trying to insert a string of more than 4k chars.

What do you mean by "blow up" here?

  create table foos (col varchar(100000));                                      
  create index on foos(col);                                                    
  insert into foos values (repeat('s', 100000));
That works fine.


> What do you mean by "blow up" here?

Errors out saying the index row size is too big for the index

> That works fine.

the b-tree implementation must have been fixed at some point then, because last time I tried it I got this: http://postgresql.1045698.n5.nabble.com/SQL-index-row-size-2...

(the thread is from 2005, but I got something along those lines last year)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: