pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Raiskup <praiskup@redhat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
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 16:41:16 +0100
Message-ID: <1630033.SqB3vyA3BZ@nb.usersys.redhat.com> (raw)
In-Reply-To: <22881.1541515786@sss.pgh.pa.us>
References: <4738198.8KVIIDhgEB@nb.usersys.redhat.com>
	<1772202.Bn4MKCBuZf@nb.usersys.redhat.com>
	<22881.1541515786@sss.pgh.pa.us>

On Tuesday, November 6, 2018 3:49:46 PM CET Tom Lane wrote:
> Pavel Raiskup <praiskup@redhat.com> writes:
> > 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?
> 
> >>> 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_. ...
> >> 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).
> 
> Yeah.  The long and short of this is that we're trampling on namespace
> that reasonably belongs to Ruby --- if they had some functions named
> "pg_something" and complained about a collision with libpq, would we
> change?  Nope.  So really we should rename these.
> 
> After looking at the code a bit I like the idea of s/rb/rbt/g
> better than s/rb/pg_rb/g.  The latter seems verbose, and it would
> also open the question of whether we need to rename rbtree.h/.c,
> which would be an additional level of complication I don't want.
> The rbt approach will allow skipping some other renamings that
> would be needed for consistency if we use pg_rb.
> 
> Barring objections I'll go make this happen shortly.
> 
> It's too late for this week's releases, but Pavel could pick up the commit
> once it happens and carry it as a Fedora patch until the next releases.

Thanks for looking at that, and no problem with this release.  To make
plruby work against supported PostgreSQL versions we'll have to first fix
quite a few _other_ legacy problems first.

Pavel







view thread (16+ messages)  latest in thread

Message-ID: <1630033.SqB3vyA3BZ@nb.usersys.redhat.com>
Permalink:  ../1630033.SqB3vyA3BZ@nb.usersys.redhat.com/
Also on:    postgresql.org/message-id/1630033.SqB3vyA3BZ@nb.usersys.redhat.com

 · 

reply

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, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, devrim@gunduz.org
  Subject: Re: plruby: rb_iterate symbol clash with libruby.so
  In-Reply-To: <1630033.SqB3vyA3BZ@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