From: | Antonin Houska <ah(at)cybertec(dot)at> |
---|---|
To: | Aleksandr Parfenov <asp437(at)gmail(dot)com> |
Cc: | a(dot)bykov(at)postgrespro(dot)ru, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Optimze usage of immutable functions as relation |
Date: | 2018-11-08 14:08:03 |
Message-ID: | 11120.1541686083@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Aleksandr Parfenov <asp437(at)gmail(dot)com> wrote:
> I fixed a typo and some comments. Please find new version attached.
I've checked this verstion too.
* is_simple_stable_function()
instead of fetching HeapTuple from the syscache manually, you might want to
consider using functions from lsyscache.c (get_func_rettype, get_func_retset,
etc.), or adding a function that returns (subset of) the fields you need in a
single call.
* pull_up_simple_function():
As you assume that ret->functions is a single-item list
Assert(list_length(rte->functions) == 1);
the following iteration is not necessary:
foreach(lc, functions_list)
Also, there seems to be a lot of copy & paste from pull_up_simple_values(), so
some refactoring would make sense.
--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26, A-2700 Wiener Neustadt
Web: https://www.cybertec-postgresql.com
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Winand | 2018-11-08 14:18:26 | Re: PostgreSQL vs SQL/XML Standards |
Previous Message | Antonin Houska | 2018-11-08 13:57:45 | Re: Optimze usage of immutable functions as relation |