|
| 1 | +# Copyright (c) 2025, Postgres Professional |
| 2 | + |
| 3 | +# Does not support the PGXS infrastructure at this time. Please, compile as part |
| 4 | +# of the contrib source tree. |
| 5 | + |
| 6 | +pg_query_state_sources=files( |
| 7 | +'pg_query_state.c', |
| 8 | +'signal_handler.c', |
| 9 | +) |
| 10 | + |
| 11 | +if host_system=='windows' |
| 12 | + pg_query_state_sources+= rc_lib_gen.process(win32ver_rc,extra_args: [ |
| 13 | +'--NAME','pg_query_state', |
| 14 | +'--FILEDESC','pg_query_state - provides facility to know the current state of query execution on working backend.',]) |
| 15 | +endif |
| 16 | + |
| 17 | +pg_query_state=shared_module('pg_query_state', |
| 18 | + pg_query_state_sources, |
| 19 | +kwargs: contrib_mod_args, |
| 20 | +) |
| 21 | +contrib_targets+= pg_query_state |
| 22 | + |
| 23 | +extversion='1.1' |
| 24 | +output_name='pg_query_state--'+ extversion+'.sql' |
| 25 | + |
| 26 | +configure_file( |
| 27 | +input:'init.sql', |
| 28 | +output: output_name, |
| 29 | +copy:true, |
| 30 | +install:true, |
| 31 | +install_dir: contrib_data_args['install_dir'], |
| 32 | +) |
| 33 | + |
| 34 | +install_data( |
| 35 | +'pg_query_state.control', |
| 36 | +'pg_query_state--1.0--1.1.sql', |
| 37 | +kwargs: contrib_data_args, |
| 38 | +) |
| 39 | + |
| 40 | +tests+= { |
| 41 | +'name':'pg_query_state', |
| 42 | +'sd':meson.current_source_dir(), |
| 43 | +'bd':meson.current_build_dir(), |
| 44 | +'isolation': { |
| 45 | +'specs': [ |
| 46 | +'corner_cases', |
| 47 | + ], |
| 48 | +'regress_args': [ |
| 49 | +'--temp-config',files('test.conf'), |
| 50 | +'--load-extension=pg_query_state', |
| 51 | + ], |
| 52 | + }, |
| 53 | +} |