Re: Refactor textToQualifiedNameList()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Subject: Re: Refactor textToQualifiedNameList()
Date: 2018-10-09 03:28:42
Message-ID: 20181009032842.GE2137@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 08, 2018 at 03:22:55PM +0000, Pavel Stehule wrote:
> I tested this patch. This patch removes some duplicate rows, what is
> good - on second hand, after this patch, the textToQualifiedNameList
> does one more copy of input string more. I looked where this function
> is used, and I don't think so it is a issue.
>
> This patch is trivial - all tests passed and I don't see any
> problem. I'll mark as ready for commit.
>
> The new status of this patch is: Ready for Committer

Are you sure that there is no performance impact? Say implement a
simple SQL-callable function which does textToQualifiedNameList on the
same string N times, and then compare the time it takes to run HEAD and
the refactored implementation. I may buy that an extra palloc call is
not something to worry about, but in my experience it can be a problem.

This patch also changes stringToQualifiedNameList from regproc.h to
varlena.h, which would break extensions calling it. That's not nice
either.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yang Xiao 2018-10-09 03:40:38 Add overflow test in function numeric_exp.
Previous Message Imai, Yoshikazu 2018-10-09 03:26:12 RE: Small performance tweak to run-time partition pruning