From: Pavel Raiskup <praiskup@redhat.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Devrim GÜNDÜZ <devrim@gunduz.org>
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> (raw)
In-Reply-To: <CA+TgmoYbguBrde0XrXpdHkFZcB3Bjc+oeR2T8Xjb1k+rzJCrPQ@mail.gmail.com>
References: <4738198.8KVIIDhgEB@nb.usersys.redhat.com>
<20461.1541269186@sss.pgh.pa.us>
<CA+TgmoYbguBrde0XrXpdHkFZcB3Bjc+oeR2T8Xjb1k+rzJCrPQ@mail.gmail.com>
On Monday, November 5, 2018 9:06:41 PM CET Robert Haas wrote:
> On Sat, Nov 3, 2018 at 2:20 PM Tom Lane <tgl@sss.pgh.pa.us> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: praiskup@redhat.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, devrim@gunduz.org
Subject: Re: plruby: rb_iterate symbol clash with libruby.so
In-Reply-To: <1772202.Bn4MKCBuZf@nb.usersys.redhat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox