[HACKERS] Combining expr{Type,Typmod,Collation}() into one function. - Mailing list pgsql-hackers

From Andres Freund
Subject [HACKERS] Combining expr{Type,Typmod,Collation}() into one function.
Date
Msg-id 20171003014104.7iv5noxxsyyf2ch7@alap3.anarazel.de
Whole thread Raw
List pgsql-hackers
Hi,

I'd recently noticed that expr* functions actually show up in profiles
because we use them at some very common paths
(e.g. ExecTypeFromTLInternal()) and that we commonly call all the three
variants from $subject in sequence.

Looking at their code I was wondering whether it's reasonable to combine
them into one function. The performance effects in my case were
neglegible, but it might still be worth it just to reduce duplication.

I've attached my *WIP* patch to do so. Unless somebody finds this
interesting and prods me, I don't plan to do something further with
this.  If we were to go with this, some cleanup would be needed.

Greetings,

Andres Freund

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [PATCH] Assert that the correct locks are held whencalling PageGetLSN()