Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1is8wy-0007mV-3d for pgsql-general@arkaria.postgresql.org; Thu, 16 Jan 2020 17:28:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1is8ww-0003ZH-9S for pgsql-general@arkaria.postgresql.org; Thu, 16 Jan 2020 17:28:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1is8wv-0003Uz-SM for pgsql-general@lists.postgresql.org; Thu, 16 Jan 2020 17:28:54 +0000 Received: from polemos.matrix.org ([94.237.46.156]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1is8wq-0002SJ-JP for pgsql-general@lists.postgresql.org; Thu, 16 Jan 2020 17:28:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=matrix.org; s=polemos; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=QZs8p+bCBYirnLF9wxv9CNAuz4fwip5jXxTVWYD6HlU=; b=hh/3tQVArZd1emSBTOT52zWqnw cGFI3+IZh5Xqtfpaey4wnzEWnLA91uti9antlAly9NS4sSpcyEfylfx7jS94Otk+8hziHZGhA3p02 sHTLMeC81jQUnmeffdv2aQOLOb0GE6i6HEhuaatmv4dUbYRqDENPJEheCMrBr4GLFQZNH+bFgzADU f4t5cjbykS3O8cOCquXGlcRjQSVy0L71APeYU4XE/qyV7tuVjYTP68WfJeE/kzSLHGR0ZuwXssmWy S/wjE1ZSh+41ULFXxTwO5qTa4uV8AnGnF5t2Cy1Ovc6VVnMl0u9SriGlGEanTQCYyZ/LyZm70bMpo cdC7yen28kB2OT7MqxROXkhCQoQXgp5ZRxzoAmC6g5rxtGvKnzBkoCKfwmfAgJ6T01UzIsWonqJe3 H3Ye8UKyKKz+Plntk1W+pSlC2iAyEeimPGVjsra47q7MJFHrjHyk+ny40JDdC4YCXo7m9i9rE9rVV D1Ve0JlXZhCJM/nuqRXrzTMCcW9xlaqiDYLk2HYzkxSQwdhXXU7BMpbsY7ckL+EywlNn02UM4rgFZ lxYl3vmDcKGO6DobfGLchMG3rFEhtyxAClmit7qcv1k1JJ/BU60rjEvE0+oGRtN67nJHSNVGf4IVc us9Aw1tsilLBHqevyDgiRJ0VDoE3AqNMq1oBVjf6I=; Received: from [2001:8b0:ba7a:e98f:2d18:c4bf:423e:ed6f] by polemos.matrix.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1is8wo-0008UK-UG; Thu, 16 Jan 2020 17:28:46 +0000 Subject: Re: Inexplicable duplicate rows with unique constraint To: Daniel Verite Cc: pgsql-general@lists.postgresql.org References: From: Richard van der Hoff Message-ID: Date: Thu, 16 Jan 2020 17:28:46 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 16/01/2020 17:24, Daniel Verite wrote: > Looking at these columns which are of type text but do not > contain words of any particular language, there's probably > no point in using a linguistic-aware collation for them. > > If you maintain the database schema, what you could do to avoid > the dependency on the OS collation and stay clear of the particular > upgrade difficulty of collations is to use COLLATE "C" for this kind of > field, as opposed to the default collation of the database. > As a bonus, operations with the "C" collations tend to be faster, > sometimes even much faster. Good to know, thanks Daniel!