[pgpool-hackers: 3699] Re: 答复: [patch] enable specific argument name for function in pgpool_adm

Tatsuo Ishii ishii at sraoss.co.jp
Mon Jul 6 15:48:50 JST 2020


>> One thing I noticed is you use following syntax in the manual patch:
> 
>> +    test=# SELECT * FROM pcp_node_info(node_id := 1, host := '', port := 11001, username := 't-ishii', password := 't-ishii');
> 
>> ":=" is an old syntax and I think it'd be better to use "=>" instead:
> 
>> https://www.postgresql.org/docs/12/sql-syntax-calling-funcs.html
> 
> Thanks for your review.
> you are right, It's better to use "=>", and I made a new patch.

Thanks.

I noticed that 0001-Update-pgpool_adm-1.2--1.3.sql.patch has an
issue. It seems it just adds new function pcp_heath_check_stats. I
think you need to change all other functions becuase the function
signatures needs to be changed.

For example for pcp_node_count, pgpool_adm-1.2--1.3.sql at least should have this:

ALTER EXTENSION pgpool_adm DROP FUNCTION pcp_node_count(text, integer, text, text, OUT node_count integer);
DROP FUNCTION pcp_node_count(text, integer, text, text, OUT node_count integer);
CREATE FUNCTION pcp_node_count(IN host text, IN port integer, IN username text, IN password text, OUT node_count integer)
 RETURNS integer
 AS 'MODULE_PATHNAME', '_pcp_node_count'
 LANGUAGE C VOLATILE STRICT;

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list