mirror of
https://github.com/postgres/postgres.git
synced 2026-04-22 22:59:54 -04:00
The Makefile failed to set HEADERS_pg_plan_advice, so the header wasn't installed. Fixing that reveals another problem: since this is just a loadable module, not an extension, the header file is installed into $(includedir_server)/contrib rather than $(includedir_server)/extension. While we have no existing cases of installing header files there, it appears to be the intent of pgxs.mk. However, this is inconsistent with meson.build, which was using dir_include_extension. Changing that to dir_include_server / 'contrib' makes the install locations consistent across the two builds. Author: Zsolt Parragi <zsolt.parragi@percona.com> Discussion: http://postgr.es/m/CAN4CZFP6NOjv__4Mx+iQD8StdpbHvzDAatEQn2n15UKJ=MySSQ@mail.gmail.com
66 lines
1.5 KiB
Meson
66 lines
1.5 KiB
Meson
# Copyright (c) 2022-2026, PostgreSQL Global Development Group
|
|
|
|
pg_plan_advice_sources = files(
|
|
'pg_plan_advice.c',
|
|
'pgpa_ast.c',
|
|
'pgpa_identifier.c',
|
|
'pgpa_join.c',
|
|
'pgpa_output.c',
|
|
'pgpa_planner.c',
|
|
'pgpa_scan.c',
|
|
'pgpa_trove.c',
|
|
'pgpa_walker.c',
|
|
)
|
|
|
|
pgpa_scanner = custom_target('pgpa_scanner',
|
|
input: 'pgpa_scanner.l',
|
|
output: 'pgpa_scanner.c',
|
|
command: flex_cmd,
|
|
)
|
|
generated_sources += pgpa_scanner
|
|
pg_plan_advice_sources += pgpa_scanner
|
|
|
|
pgpa_parser = custom_target('pgpa_parser',
|
|
input: 'pgpa_parser.y',
|
|
kwargs: bison_kw,
|
|
)
|
|
generated_sources += pgpa_parser.to_list()
|
|
pg_plan_advice_sources += pgpa_parser
|
|
|
|
if host_system == 'windows'
|
|
pg_plan_advice_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
|
'--NAME', 'pg_plan_advice',
|
|
'--FILEDESC', 'pg_plan_advice - help the planner get the right plan',])
|
|
endif
|
|
|
|
pg_plan_advice_inc = include_directories('.')
|
|
|
|
pg_plan_advice = shared_module('pg_plan_advice',
|
|
pg_plan_advice_sources,
|
|
include_directories: pg_plan_advice_inc,
|
|
kwargs: contrib_mod_args,
|
|
)
|
|
contrib_targets += pg_plan_advice
|
|
|
|
install_headers(
|
|
'pg_plan_advice.h',
|
|
install_dir: dir_include_server / 'contrib' / 'pg_plan_advice',
|
|
)
|
|
|
|
tests += {
|
|
'name': 'pg_plan_advice',
|
|
'sd': meson.current_source_dir(),
|
|
'bd': meson.current_build_dir(),
|
|
'regress': {
|
|
'sql': [
|
|
'gather',
|
|
'join_order',
|
|
'join_strategy',
|
|
'partitionwise',
|
|
'prepared',
|
|
'scan',
|
|
'semijoin',
|
|
'syntax',
|
|
],
|
|
},
|
|
}
|