Re: BUG #3965: UNIQUE constraint fails on long column values
| От | Bruce Momjian |
|---|---|
| Тема | Re: BUG #3965: UNIQUE constraint fails on long column values |
| Дата | |
| Msg-id | 200802182212.m1IMCSD14587@momjian.us обсуждение исходный текст |
| Ответ на | BUG #3965: UNIQUE constraint fails on long column values ("Juho Saarikko" <juhos@mbnet.fi>) |
| Ответы |
Re: BUG #3965: UNIQUE constraint fails on long column values
Re: BUG #3965: UNIQUE constraint fails on long column values |
| Список | pgsql-bugs |
Juho Saarikko wrote:
> While I didn't test, I'd imagine that this would also mean that any attempt
> to insert such values to an already unique column would fail.
Works here in 8.3:
test=> create table test (x text unique);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "test_x_key" for table "test"
CREATE TABLE
test=> insert into test values (repeat('a', 50000));
INSERT 0 1
Even this works:
test=> insert into test values (repeat('a', 50000) || 'b');
I believe the index only indexes 8192 bytes but checks the heap for
longer values to check the full length.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
В списке pgsql-bugs по дате отправления: