Replace hardcoded database name from regression tests with :TEST_DBNAME
Remove creation of database single_2 from test runner and add it to
bgw_launcher and loader test since no other tests used those
use SQL comments in test scripts
On platforms using libraries and executables in ELF format (e.g.,
Linux), exported symbols can collide. If a symbol (e.g., a function)
is already available, loading a module with a function that has the
exact same name will cause the newly loaded library to use the already
existing function instead of the one in the new module. Unfortunately,
GCC and Clang exports all symbols by default.
To avoid symbol collisions, this change compiles the extension with
`-fvisibility=hidden` on Unix platforms, which means a symbol isn't
exported unless explicitly specified. Note that symbols are not
exported by default on Windows. For GCC and Clang, a symbol can be
exported by annotating a function or variable with `__attribute__
((visibility ("default")))`. This is done transparently using our
custom `TS_FUNCTION_INFO_V1` macro. Note that functions exported with
that macro might still collide with existing symbols so they should
have proper name prefixes that make collisions unlikely.
A test for conflicting symbols runs in Debug configuration. When
compiled in Debug configuration, code with an identically named
function is added to both the loader and then versioned extension,
although the functions return different outputs. The functions are
called from both the loader and the versioned extension and the output
should contain different module names if no conflict.
The test fails on Linux if not compiled with -fvisibility=hidden.