Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpyr3-0008NU-3t for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2016 14:32:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpyr2-0004uJ-Mf for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2016 14:32:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpypd-0002X4-Gh for pgsql-hackers@postgresql.org; Fri, 30 Sep 2016 14:30:33 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpypa-0005tW-Qr for pgsql-hackers@postgresql.org; Fri, 30 Sep 2016 14:30:32 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id BD64921245; Fri, 30 Sep 2016 10:30:29 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 30 Sep 2016 10:30:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=i1iZxmgXJ+k0rNK pVVnWBScQDvY=; b=mwPHVPixVZbqFxYSTzBtrHn0wv3BAdpHYh6Ynk4krJntMMN MM2OSaibu1sJUgqTlQwci5EKL3YOsGJ8EY5VuYgm5qqtDkTPgHRx2Nf1aH+vNJI9 K1JHVKEUL0u8AJsczQOfLeDQzwygCObbnbU9E4LIXQWrlNv6PHdzXTxqre6A= X-Sasl-enc: KuftjI6pS/aOCPLDxg7+LBgAbICyQn0P/Z8FzHjKL10H 1475245829 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 6AA58CC091; Fri, 30 Sep 2016 10:30:29 -0400 (EDT) Subject: Re: ICU integration To: Thomas Munro References: <85364fde-091f-bbc0-fec2-e3ede39840a6@2ndquadrant.com> Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <071e7c00-beba-480d-fa62-0fbcf3fa7360@2ndquadrant.com> Date: Fri, 30 Sep 2016 10:30:28 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 9/23/16 2:27 AM, Thomas Munro wrote: > This patch adds pkg-config support to our configure script, in order > to produce the build options for ICU. That's cool, and I'm a fan of > pkg-config, but it's an extra dependency that I just wanted to > highlight. For example MacOSX appears to ship with ICU but has is no > pkg-config or ICU .pc files out of the box (erm, I can't even find the > headers, so maybe that copy of ICU is useless to everyone except > Apple). The Homebrew package icu4c contains this note: OS X provides libicucore.dylib (but nothing else). That probably explains what you are seeing. > There is something missing from the configure script however: the > output of pkg-config is not making it into CFLAGS or LDFLAGS, so > building fails on FreeBSD and MacOSX where for example > doesn't live in the default search path. It sets ICU_CFLAGS and ICU_LIBS, but it seems I didn't put ICU_CFLAGS in the backend makefiles. So that should be easy to fix. > You call the built-in strcoll/strxfrm collation provider "posix", and > although POSIX does define those functions, it only does so because it > inherits them from ISO C90. POSIX defines strcoll_l() and such. But I agree SYSTEM might be better. > I notice that you use encoding -1, meaning "all". The use of encoding -1 is existing behavior. > I haven't fully > grokked what that really means but it appears that we won't be able to > create any new such collations after initdb using CREATE COLLATION, if > for example you update your ICU installation and now have a new > collation available. When I tried dropping some and recreating them > they finished up with collencoding = 6. Should the initdb-created > rows use 6 too? Good observation. That will need some fine-tuning. > The warning persists even after I reindex all affected tables (and > start a new backend), because you're only recording the collation at > pg_collation level and then only setting it at initdb time, so that > HINT isn't much use for clearing the warning. I think you'd need to > record a snapshot of the version used for each collation that was used > on *each index*, and update it whenever you CREATE INDEX or REINDEX > etc. There can of course be more than one collation and thus version > involved, if you have columns with different collations, so I guess > you'd need an column to hold an array of version snapshots whose order > corresponds to pg_index.indcollation's. Hmm, yeah, that will need more work. To be completely correct, I think, we'd also need to record the version in each expression node, so that check constraints of the form CHECK (x > 'abc') can be handled. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers