Hi! I'm an absolute beginner to PostgreSQL and there's probably stupid questions coming up more than just this one: Is there a limit to the bytesize of the primary key? (I'm migrating from MySQL and there it was only 255). I couldn't find this in the documentation at first glance. Jass
jaanush@hot.ee (Jass) writes:
> Is there a limit to the bytesize of the
> primary key? (I'm migrating from MySQL
> and there it was only 255).
btree index entries (primary key or not) are limited to 1/3 page, or
about 2700 bytes in a standard installation. In the case of
compressible types like text or varchar, compression can be applied
first, so you'd probably find you could get away with field widths
up to 4k or so. If you have entries wider than that, I'd begin to
question whether an index on the field really makes sense ...
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера