Skip site navigation (1) Skip section navigation (2)

Re: BUG #3965: UNIQUE constraint fails on long column values

From: Kris Jurka <books(at)ejurka(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Juho Saarikko <juhos(at)mbnet(dot)fi>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3965: UNIQUE constraint fails on long column values
Date: 2008-02-19 00:26:14
Message-ID: Pine.BSO.4.64.0802181914100.11576@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-docs

On Mon, 18 Feb 2008, Bruce Momjian wrote:

> 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=> insert into test values (repeat('a', 50000) || 'b');
>

This only works because it gets toasted before being put in the index. 
Since you've selected something real compressible, you can fit 50k chars 
into it.

Kris Jurka

In response to

pgsql-docs by date

Next:From: Heikki LinnakangasDate: 2008-02-20 08:54:50
Subject: Re: BUG #3965: UNIQUE constraint fails on long column values
Previous:From: Juho SaarikkoDate: 2008-02-18 23:21:11
Subject: Re: BUG #3965: UNIQUE constraint fails on long column values

pgsql-bugs by date

Next:From: ITAGAKI TakahiroDate: 2008-02-19 12:16:14
Subject: BUG #3969: pg_ctl cannot detect server startup
Previous:From: Juho SaarikkoDate: 2008-02-18 23:21:11
Subject: Re: BUG #3965: UNIQUE constraint fails on long column values

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group