[pgpool-hackers: 3718] problem when getting function name
Hou, Zhijie
houzj.fnst at cn.fujitsu.com
Mon Jul 20 17:13:13 JST 2020
Sorry ,Forget to write the title
-----Original Message-----
From: Hou, Zhijie
Sent: Monday, July 20, 2020 4:03 PM
To: pgpool-hackers at pgpool.net
Subject:
Hi pgpool hackers,
1.when enabled memory query cache, if I call function like the following, the immutable function seems not to be recognized.
postgres=# select postgres.public.immutable_func();
Currently in pgpool, The process of getting funcname is as follows:
----------------------------------------------------------------
if (length == 1) /* no schema qualification? */
{
fname = strVal(linitial(fcall->funcname));
}
else
{
fname = strVal(lsecond(fcall->funcname)); /* with schema
* qualification */
}
----------------------------------------------------------------
If function call is in the form of "Catalogname.schemaname.funcname()",
The function name is the third one in the list.
Since function name is always the last one in the list, I think we can use "llast(fcall->funcname)"
to get the function name.
What do you think?
2.when investigating code, I found a TODO is related, and I tried to do it.
<<Allow to use schema qualifications in black_function_list and white_function_list>>
Currently schema qualifications are silently ignored in these parameter.
See the attachment for the patch.
Best regards,
houzj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-pool_select_walker.c.patch
Type: application/octet-stream
Size: 4154 bytes
Desc: 0001-Update-pool_select_walker.c.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200720/0e6cc37e/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Update-ja-loadbalance.sgml.patch
Type: application/octet-stream
Size: 2785 bytes
Desc: 0004-Update-ja-loadbalance.sgml.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200720/0e6cc37e/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Update-en-loadbalance.sgml.patch
Type: application/octet-stream
Size: 2407 bytes
Desc: 0005-Update-en-loadbalance.sgml.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200720/0e6cc37e/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Update-pool_select_walker.h.patch
Type: application/octet-stream
Size: 1050 bytes
Desc: 0002-Update-pool_select_walker.h.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200720/0e6cc37e/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Update-test.sh.patch
Type: application/octet-stream
Size: 2421 bytes
Desc: 0003-Update-test.sh.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200720/0e6cc37e/attachment-0009.obj>
More information about the pgpool-hackers
mailing list