Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8E79A2E0039 for ; Mon, 18 Feb 2008 20:26:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 42176-06 for ; Mon, 18 Feb 2008 20:26:33 -0400 (AST) Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id E16902E0041 for ; Mon, 18 Feb 2008 20:26:22 -0400 (AST) Received: (qmail 14047 invoked by uid 1112); 19 Feb 2008 00:26:14 -0000 Date: Mon, 18 Feb 2008 19:26:14 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Bruce Momjian cc: Juho Saarikko , pgsql-bugs@postgresql.org Subject: Re: BUG #3965: UNIQUE constraint fails on long column values In-Reply-To: <200802182212.m1IMCSD14587@momjian.us> Message-ID: References: <200802182212.m1IMCSD14587@momjian.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/169 X-Sequence-Number: 19736 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