pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.
@ 2018-11-06 18:25 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-11-06 18:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.

The "rb" prefix is used by Ruby, so that our existing code results
in name collisions that break plruby.  We discussed ways to prevent
that by adjusting dynamic linker options, but it seems that at best
we'd move the pain to other cases.  Renaming to avoid the collision
is the only portable fix anyway.  Fortunately, our rbtree code is
not (yet?) widely used --- in core, there's only a single usage
in GIN --- so it seems likely that we can get away with a rename.

I chose to do this basically as s/rb/rbt/g, except for places where
there already was a "t" after "rb".  The patch could have been made
smaller by only touching linker-visible symbols, but it would have
resulted in oddly inconsistent-looking code.  Better to make it look
like "rbt" was the plan all along.

Back-patch to v10.  The rbtree.c code exists back to 9.5, but
rb_iterate() which is the actual immediate source of pain was added
in v10, so it seems like changing the names before that would have
more risk than benefit.

Per report from Pavel Raiskup.

Discussion: https://postgr.es/m/4738198.8KVIIDhgEB@nb.usersys.redhat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/003c68a3b45d0d135b874acfe04cf3fb79a6f172

Modified Files
--------------
src/backend/access/gin/ginbulk.c           |  32 +--
src/backend/lib/rbtree.c                   | 349 +++++++++++++++--------------
src/include/access/gin_private.h           |   2 +-
src/include/lib/rbtree.h                   |  58 ++---
src/test/modules/test_rbtree/test_rbtree.c |  90 ++++----
5 files changed, 267 insertions(+), 264 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.
@ 2018-11-06 18:25 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-11-06 18:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.

The "rb" prefix is used by Ruby, so that our existing code results
in name collisions that break plruby.  We discussed ways to prevent
that by adjusting dynamic linker options, but it seems that at best
we'd move the pain to other cases.  Renaming to avoid the collision
is the only portable fix anyway.  Fortunately, our rbtree code is
not (yet?) widely used --- in core, there's only a single usage
in GIN --- so it seems likely that we can get away with a rename.

I chose to do this basically as s/rb/rbt/g, except for places where
there already was a "t" after "rb".  The patch could have been made
smaller by only touching linker-visible symbols, but it would have
resulted in oddly inconsistent-looking code.  Better to make it look
like "rbt" was the plan all along.

Back-patch to v10.  The rbtree.c code exists back to 9.5, but
rb_iterate() which is the actual immediate source of pain was added
in v10, so it seems like changing the names before that would have
more risk than benefit.

Per report from Pavel Raiskup.

Discussion: https://postgr.es/m/4738198.8KVIIDhgEB@nb.usersys.redhat.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1f28ec6be27085819a6adfa96ba305bb4ee47f4c

Modified Files
--------------
src/backend/access/gin/ginbulk.c           |  32 +--
src/backend/lib/rbtree.c                   | 349 +++++++++++++++--------------
src/include/access/gin_private.h           |   2 +-
src/include/lib/rbtree.h                   |  58 ++---
src/test/modules/test_rbtree/test_rbtree.c |  90 ++++----
5 files changed, 267 insertions(+), 264 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.
@ 2018-11-06 18:25 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-11-06 18:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.

The "rb" prefix is used by Ruby, so that our existing code results
in name collisions that break plruby.  We discussed ways to prevent
that by adjusting dynamic linker options, but it seems that at best
we'd move the pain to other cases.  Renaming to avoid the collision
is the only portable fix anyway.  Fortunately, our rbtree code is
not (yet?) widely used --- in core, there's only a single usage
in GIN --- so it seems likely that we can get away with a rename.

I chose to do this basically as s/rb/rbt/g, except for places where
there already was a "t" after "rb".  The patch could have been made
smaller by only touching linker-visible symbols, but it would have
resulted in oddly inconsistent-looking code.  Better to make it look
like "rbt" was the plan all along.

Back-patch to v10.  The rbtree.c code exists back to 9.5, but
rb_iterate() which is the actual immediate source of pain was added
in v10, so it seems like changing the names before that would have
more risk than benefit.

Per report from Pavel Raiskup.

Discussion: https://postgr.es/m/4738198.8KVIIDhgEB@nb.usersys.redhat.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b2e754c14e2741a076691e8c6f0099afffaa842e

Modified Files
--------------
src/backend/access/gin/ginbulk.c |  32 ++--
src/backend/lib/rbtree.c         | 378 +++++++++++++++++++--------------------
src/include/access/gin_private.h |   2 +-
src/include/lib/rbtree.h         |  58 +++---
4 files changed, 235 insertions(+), 235 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-11-06 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 18:25 pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-06 18:25 pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-06 18:25 pgsql: Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. Tom Lane <tgl@sss.pgh.pa.us>

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