[pgpool-general: 1748] Re: Problems running jdbc testsuite

Tatsuo Ishii ishii at postgresql.org
Wed May 15 15:50:59 JST 2013

>> -#define HASPGPOOL_REGCLASSQUERY "SELECT count(*) FROM pg_catalog.pg_proc AS p WHERE p.proname = 'pgpool_regclass' AND has_function_privilege('%s', 'pgpool_regclass(cstring)', 'execute')"
>> +#define HASPGPOOL_REGCLASSQUERY "SELECT count(*) from (SELECT has_function_privilege('%s', 'pgpool_regclass(cstring)', 'execute') WHERE EXISTS(SELECT * FROM pg_catalog.pg_proc AS p WHERE p.proname = 'pgpool_regclass')) AS s"
> Haven't read any code around this, but wouldn't "current_user" work as
> well in place of the "'%s'" there?

Yes, current_user should work as well. The reason why we use %s here
is, the query is just a "template" and needs a parameter when the
query get executed later by pool_search_relcache().

See pool_relcache.c for more details.
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-general mailing list