Combining expr{Type,Typmod,Collation}() into one function.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Combining expr{Type,Typmod,Collation}() into one function.
Date: 2017-10-03 01:41:04
Message-ID: 20171003014104.7iv5noxxsyyf2ch7@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
0001-WIP-Combine-expr-Type-Typmod-Collation-into-one-func.patch text/x-diff 30.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-10-03 01:48:41 Re: [PATCH] Assert that the correct locks are held when calling PageGetLSN()
Previous Message Michael Paquier 2017-10-03 01:31:29 Re: [JDBC] Channel binding support for SCRAM-SHA-256