Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK0hQ-0007PN-Hq for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Nov 2018 12:43:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK0hO-0005ka-FM for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Nov 2018 12:43:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK0hO-0005kS-4x for pgsql-hackers@lists.postgresql.org; Tue, 06 Nov 2018 12:43:14 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK0hL-0000Uz-6s for pgsql-hackers@postgresql.org; Tue, 06 Nov 2018 12:43:12 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A016308A973; Tue, 6 Nov 2018 12:43:09 +0000 (UTC) Received: from nb.usersys.redhat.com (unknown [10.43.2.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B6F6600D7; Tue, 6 Nov 2018 12:43:08 +0000 (UTC) From: Pavel Raiskup To: Robert Haas Cc: Tom Lane , "pgsql-hackers@postgresql.org" , Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= Subject: Re: plruby: rb_iterate symbol clash with libruby.so Date: Tue, 06 Nov 2018 13:43:03 +0100 Message-ID: <1772202.Bn4MKCBuZf@nb.usersys.redhat.com> In-Reply-To: References: <4738198.8KVIIDhgEB@nb.usersys.redhat.com> <20461.1541269186@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 06 Nov 2018 12:43:09 +0000 (UTC) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Monday, November 5, 2018 9:06:41 PM CET Robert Haas wrote: > On Sat, Nov 3, 2018 at 2:20 PM Tom Lane wrote: > > > Is it realistic we could rename red-black tree methods from 'rb_*' to e.g. > > > 'rbt_*' to avoid this clash? > > > > That's not terribly appetizing, because it essentially means we're giving > > Ruby (and potentially every other library on the planet) veto power over > > our function namespace. That does not scale, especially not when the > > feedback loop has a time constant measured in years :-( > > > > I don't have a huge objection to renaming the rbtree functions, other > > than the precedent it sets ... > > Maybe prefixing with pg_ would better than rb_ to rbt_. That's our > semi-standard namespace prefix, I think. Of course nothing keeps > somebody else from using it, too, but we can hope that they won't. > It's certainly not very surprising that Ruby has symbols starting with > rb_... I now realized that there's rb_block_call() alternative for rb_iterate() Ruby call -- which fortunately doesn't collide with PostgreSQL internals. It means that for sufficiently new Ruby there exists some solution (not that something similar can not re-appear elsewhere). Pavel