fix: hoist function settings with memory units properly
f9ee1f7e introduced the hoisting of function settings as transaction-scoped
settings. However, this currently doesn't work with memory units, which are
case-sensitive according to the docs [1]. This removes the lowercasing of
values to make them work.
This is not added to the CHANGELOG, because this feature was not released, yet.
[1]: https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-NAMES-VALUES
This commit is contained in:
@@ -456,7 +456,7 @@ funcsSqlQuery pgVer = [q|
|
||||
SELECT
|
||||
array_agg(row(
|
||||
substr(setting, 1, strpos(setting, '=') - 1),
|
||||
lower(substr(setting, strpos(setting, '=') + 1))
|
||||
substr(setting, strpos(setting, '=') + 1)
|
||||
)) as kvs
|
||||
FROM unnest(proconfig) setting
|
||||
WHERE setting not LIKE 'default_transaction_isolation%'
|
||||
|
||||
@@ -205,7 +205,7 @@ $$ language sql;
|
||||
|
||||
create or replace function work_mem_test() returns text as $$
|
||||
select current_setting('work_mem',false);
|
||||
$$ language sql set work_mem = '6000';
|
||||
$$ language sql set work_mem = '6000kB';
|
||||
|
||||
create or replace function multiple_func_settings_test() returns setof record as $$
|
||||
select current_setting('work_mem',false) as work_mem,
|
||||
|
||||
Reference in New Issue
Block a user