Re: Refactor textToQualifiedNameList() - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Refactor textToQualifiedNameList()
Date
Msg-id 20181009125412.2g32c5r4nouhfdya@alvherre.pgsql
Whole thread Raw
In response to Re: Refactor textToQualifiedNameList()  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Refactor textToQualifiedNameList()  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 2018-Oct-09, Michael Paquier wrote:

> On Tue, Oct 09, 2018 at 10:47:48AM +0200, Pavel Stehule wrote:
> > The difference on 10M calls is about 300ms - it is about 6%.
> 
> This number gives a good argument for rejecting this patch.  I am not
> usually against code beautification, but that's a high price to pay for
> just some refactoring.  On top of that, this potentially breaks
> extension compilation.

One thing I do like about this patch is that it takes
stringToQualifiedNameList out of regproc.c, where it was put as static
by commit 52200befd04b ("Implement types regprocedure, regoper,
regoperator, regclass, regtype" April 2002); made extern by ba790a5608ea
("Here is a patch for Composite and Set returning function support."
June 2002) in what appears to have been a careless change.  The function
would end up in a place where it more reasonably belongs into,
varlena.c, next to its sibling textToQualifiedNameList.

The committer of such a change will get a lot of flak for changing the
#include requirements for code that calls that function, though.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From:
Date:
Subject: RE: NOTIFY and pg_notify performance when deduplicating notifications
Next
From: Daniel Gustafsson
Date:
Subject: Support custom socket directory in pg_upgrade