mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-25 20:10:41 +08:00
isn's weak mode used to be a simple static variable, settable only via the isn_weak(boolean) function. This wasn't optimal, as this means it doesn't respect transactions nor respond to RESET ALL. This patch makes isn.weak a GUC parameter instead, so that it acts like any other user-settable parameter. The isn_weak() functions are retained for backwards compatibility. But we must fix their volatility markings: they were marked IMMUTABLE which is surely incorrect, and PARALLEL RESTRICTED which isn't right for GUC-related functions either. Mark isn_weak(boolean) as VOLATILE and PARALLEL UNSAFE, matching set_config(). Mark isn_weak() as STABLE and PARALLEL SAFE, matching current_setting(). Reported-by: Viktor Holmberg <v@viktorh.net> Diagnosed-by: Daniel Gustafsson <daniel@yesql.se> Author: Viktor Holmberg <v@viktorh.net> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/790bc1f9-74dc-4b50-94d2-8147315b1556@Spark
43 lines
781 B
Meson
43 lines
781 B
Meson
# Copyright (c) 2022-2025, PostgreSQL Global Development Group
|
|
|
|
isn_sources = files(
|
|
'isn.c',
|
|
)
|
|
|
|
if host_system == 'windows'
|
|
isn_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
|
'--NAME', 'isn',
|
|
'--FILEDESC', 'isn - data types for international product numbering standards',])
|
|
endif
|
|
|
|
isn = shared_module('isn',
|
|
isn_sources,
|
|
kwargs: contrib_mod_args,
|
|
)
|
|
contrib_targets += isn
|
|
|
|
install_data(
|
|
'isn.control',
|
|
'isn--1.0--1.1.sql',
|
|
'isn--1.1.sql',
|
|
'isn--1.1--1.2.sql',
|
|
'isn--1.2--1.3.sql',
|
|
kwargs: contrib_data_args,
|
|
)
|
|
|
|
install_headers(
|
|
'isn.h',
|
|
install_dir: dir_include_extension / 'isn',
|
|
)
|
|
|
|
tests += {
|
|
'name': 'isn',
|
|
'sd': meson.current_source_dir(),
|
|
'bd': meson.current_build_dir(),
|
|
'regress': {
|
|
'sql': [
|
|
'isn',
|
|
],
|
|
},
|
|
}
|