### Short Version Installation Steps Source: https://www.postgresql.org/docs/19/install-meson.html This is a condensed sequence of commands for building and installing PostgreSQL using Meson. It includes configuration, compilation, installation, user setup, data directory initialization, and basic server start. ```bash meson setup build --prefix=/usr/local/pgsql cd build ninja su ninja install adduser postgres mkdir -p /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test ``` -------------------------------- ### Basic Configuration Source: https://www.postgresql.org/docs/19/install-make.html Run the configure script for a default installation setup. ```bash ./configure ``` -------------------------------- ### OpenBSD Autostart Script Snippet Source: https://www.postgresql.org/docs/19/server-start.html Example configuration for starting PostgreSQL on OpenBSD by adding commands to '/etc/rc.local'. Ensures the server is started with appropriate checks and logging. ```bash if [ -x /usr/local/pgsql/bin/pg_ctl -a -x /usr/local/pgsql/bin/postgres ]; then su -l postgres -c '/usr/local/pgsql/bin/pg_ctl start -s -l /var/postgresql/log -D /usr/local/pgsql/data' echo -n ' postgresql' fi ``` -------------------------------- ### libpq Example Program 1 Source: https://www.postgresql.org/docs/current/libpq-example.html Demonstrates connecting to a PostgreSQL database, setting the search path, starting a transaction, declaring and fetching data using a cursor, and closing the connection. This example is useful for understanding basic database operations with libpq. ```c #include #include #include "libpq-fe.h" static void exit_nicely(PGconn *conn) { PQfinish(conn); exit(1); } int main(int argc, char **argv) { const char *conninfo; PGconn *conn; PGresult *res; int nFields; int i, j; /* * If the user supplies a parameter on the command line, use it as the * conninfo string; otherwise default to setting dbname=postgres and using * environment variables or defaults for all other connection parameters. */ if (argc > 1) conninfo = argv[1]; else conninfo = "dbname = postgres"; /* Make a connection to the database */ conn = PQconnectdb(conninfo); /* Check to see that the backend connection was successfully made */ if (PQstatus(conn) != CONNECTION_OK) { fprintf(stderr, "%s", PQerrorMessage(conn)); exit_nicely(conn); } /* Set always-secure search path, so malicious users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); exit_nicely(conn); } /* * Should PQclear PGresult whenever it is no longer needed to avoid memory * leaks */ PQclear(res); /* * Our test case here involves using a cursor, for which we must be inside * a transaction block. We could do the whole thing with a single * PQexec() of "select * from pg_database", but that's too trivial to make * a good example. */ /* Start a transaction block */ res = PQexec(conn, "BEGIN"); if (PQresultStatus(res) != PGRES_COMMAND_OK) { fprintf(stderr, "BEGIN command failed: %s", PQerrorMessage(conn)); PQclear(res); exit_nicely(conn); } PQclear(res); /* * Fetch rows from pg_database, the system catalog of databases */ res = PQexec(conn, "DECLARE myportal CURSOR FOR select * from pg_database"); if (PQresultStatus(res) != PGRES_COMMAND_OK) { fprintf(stderr, "DECLARE CURSOR failed: %s", PQerrorMessage(conn)); PQclear(res); exit_nicely(conn); } PQclear(res); res = PQexec(conn, "FETCH ALL in myportal"); if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "FETCH ALL failed: %s", PQerrorMessage(conn)); PQclear(res); exit_nicely(conn); } /* first, print out the attribute names */ nFields = PQnfields(res); for (i = 0; i < nFields; i++) printf("% -15s", PQfname(res, i)); printf("\n\n"); /* next, print out the rows */ for (i = 0; i < PQntuples(res); i++) { for (j = 0; j < nFields; j++) printf("% -15s", PQgetvalue(res, i, j)); printf("\n"); } PQclear(res); /* close the portal ... we don't bother to check for errors ... */ res = PQexec(conn, "CLOSE myportal"); PQclear(res); /* end the transaction */ res = PQexec(conn, "END"); PQclear(res); /* close the connection to the database and cleanup */ PQfinish(conn); return 0; } ``` -------------------------------- ### Meson Setup with Custom Prefix Source: https://www.postgresql.org/docs/19/install-meson.html Configures the build directory with a custom installation prefix. This allows specifying a non-default location for installed files. ```bash meson setup build --prefix=/home/user/pg-install ``` -------------------------------- ### Benchmark Setup and Execution Source: https://www.postgresql.org/docs/19/intarray.html Demonstrates the steps to set up a test database, create the intarray extension, populate test data, and run the benchmark script for the intarray extension. ```bash cd .../contrib/intarray/bench createdb TEST psql -c "CREATE EXTENSION intarray" TEST ./create_test.pl | psql TEST ./bench.pl ``` -------------------------------- ### PL/pgSQL GET DIAGNOSTICS Example Source: https://www.postgresql.org/docs/19/plpgsql-statements.html An example of using GET DIAGNOSTICS to retrieve the number of rows processed by the most recent SQL command into an integer variable. ```plpgsql GET DIAGNOSTICS integer_var = ROW_COUNT; ``` -------------------------------- ### PL/pgSQL GET DIAGNOSTICS Example for ROW_COUNT Source: https://www.postgresql.org/docs/current/plpgsql-statements.html An example of using GET DIAGNOSTICS to retrieve the number of rows processed by the most recent SQL command into an integer variable. ```plpgsql GET DIAGNOSTICS integer_var = ROW_COUNT; ``` -------------------------------- ### Short Version Installation Steps Source: https://www.postgresql.org/docs/19/install-make.html A condensed sequence of commands for a quick installation of PostgreSQL from source. ```bash ./configure make su make install adduser postgres mkdir -p /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test ``` -------------------------------- ### Disable RPATH for Relocatable Installs Source: https://www.postgresql.org/docs/19/install-meson.html Use this option with 'meson setup' to ensure the installation is relocatable, meaning it can be moved after installation without issues. ```bash meson setup -Drpath=false ``` -------------------------------- ### Get Current Timestamp (Transaction Start) Source: https://www.postgresql.org/docs/current/functions-datetime.html Retrieves the current date and time, representing the start of the current transaction. ```sql SELECT current_timestamp; ``` -------------------------------- ### Get Current Timestamp with Limited Precision (Transaction Start) Source: https://www.postgresql.org/docs/current/functions-datetime.html Retrieves the current date and time (start of transaction) with a specified precision. ```sql SELECT current_timestamp(0); ``` -------------------------------- ### Example of Including a Configuration Directory Source: https://www.postgresql.org/docs/19/config-setting.html This shows how to reference a directory containing configuration files, allowing for modular management of settings. ```postgresql include_dir 'conf.d' ``` -------------------------------- ### Get Current Timestamp (Transaction Start) Source: https://www.postgresql.org/docs/19/functions-datetime.html Retrieves the current date and time at the start of the current transaction, including the time zone. ```PostgreSQL current_timestamp ``` -------------------------------- ### Example: Setting up hstore transform for plpython3u Source: https://www.postgresql.org/docs/19/sql-createtransform.html Demonstrates the necessary steps to create a transform for the 'hstore' type and 'plpython3u' language, including type and extension creation, function definitions, and the final transform creation. ```sql CREATE TYPE hstore ...; CREATE EXTENSION plpython3u; CREATE FUNCTION hstore_to_plpython(val internal) RETURNS internal LANGUAGE C STRICT IMMUTABLE AS ...; CREATE FUNCTION plpython_to_hstore(val internal) RETURNS hstore LANGUAGE C STRICT IMMUTABLE AS ...; CREATE TRANSFORM FOR hstore LANGUAGE plpython3u ( FROM SQL WITH FUNCTION hstore_to_plpython(internal), TO SQL WITH FUNCTION plpython_to_hstore(internal) ); ``` -------------------------------- ### Basic Connection URI Examples Source: https://www.postgresql.org/docs/19/libpq-connect.html Illustrates various valid connection URI syntaxes, showing optional components like user, host, port, and database name. ```text postgresql:// ``` ```text postgresql://localhost ``` ```text postgresql://localhost:5433 ``` ```text postgresql://localhost/mydb ``` ```text postgresql://user@localhost ``` ```text postgresql://user:secret@localhost ``` ```text postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp ``` ```text postgresql://host1:123,host2:456/somedb?target_session_attrs=any&application_name=myapp ``` -------------------------------- ### Install PostgreSQL World (including docs) Source: https://www.postgresql.org/docs/19/install-make.html Installs the entire PostgreSQL build, including documentation. ```bash make install-world ``` -------------------------------- ### Compile Tutorial Scripts Source: https://www.postgresql.org/docs/19/tutorial-sql-intro.html Navigate to the PostgreSQL source tutorial directory and run 'make' to compile C files and create necessary scripts for the tutorial. ```bash $ cd _..._/src/tutorial $ make ``` -------------------------------- ### Start PostgreSQL Server on Solaris Source: https://www.postgresql.org/docs/19/server-start.html This command starts the PostgreSQL server using pg_ctl on Solaris systems. Ensure the path to pg_ctl and the data directory are correct for your installation. ```bash su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data" ``` -------------------------------- ### Get Transaction, Statement, and Clock Timestamps Source: https://www.postgresql.org/docs/current/functions-datetime.html These PostgreSQL-specific functions provide timestamps for the transaction start, statement start, or the actual current time. `now()` is a traditional equivalent to `transaction_timestamp()`. ```sql SELECT CURRENT_TIMESTAMP; SELECT now(); SELECT TIMESTAMP 'now'; ``` -------------------------------- ### Build All Components Source: https://www.postgresql.org/docs/19/install-make.html Compile the server, utilities, client applications, documentation, and contrib modules. ```bash make world ``` -------------------------------- ### Build and Install All Contrib Modules Source: https://www.postgresql.org/docs/19/contrib.html To build and install all optional components from the 'contrib' directory, navigate to the 'contrib' directory in a configured source tree and run 'make' followed by 'make install'. ```bash **make** **make install** ``` -------------------------------- ### Get Current Timestamp with Limited Precision (Transaction Start) Source: https://www.postgresql.org/docs/19/functions-datetime.html Retrieves the current date and time at the start of the current transaction with a specified precision, including the time zone. ```PostgreSQL current_timestamp(0) ``` -------------------------------- ### Install PostgreSQL World (binaries only) Source: https://www.postgresql.org/docs/19/install-make.html Installs the PostgreSQL binaries without documentation. Use this if documentation was not built. ```bash make install-world-bin ``` -------------------------------- ### Get Current Statement Timestamp Source: https://www.postgresql.org/docs/19/functions-datetime.html Retrieves the current date and time at the start of the current statement. ```sql statement_timestamp() ``` -------------------------------- ### Execute Query with Binary Parameters and Results using libpq Source: https://www.postgresql.org/docs/current/libpq-example.html This snippet demonstrates setting up binary parameters, executing a query using PQexecParams, and processing binary results. Ensure libpq is properly linked and initialized. ```c /* Convert integer value "2" to network byte order */ binaryIntVal = htonl((uint32_t) 2); /* Set up parameter arrays for PQexecParams */ paramValues[0] = (char *) &binaryIntVal; paramLengths[0] = sizeof(binaryIntVal); paramFormats[0] = 1; /* binary */ res = PQexecParams(conn, "SELECT * FROM test1 WHERE i = $1::int4", 1, /* one param */ NULL, /* let the backend deduce param type */ paramValues, paramLengths, paramFormats, 1); /* ask for binary results */ if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SELECT failed: %s", PQerrorMessage(conn)); PQclear(res); exit_nicely(conn); } show_binary_results(res); PQclear(res); /* close the connection to the database and cleanup */ PQfinish(conn); return 0; } ``` -------------------------------- ### Get Enum Range Starting from First Value Source: https://www.postgresql.org/docs/19/functions-enum.html Retrieves enum values from the beginning of the 'rainbow' type up to 'green'. If the first parameter is null, the range starts from the enum's first value. ```sql enum_range(NULL, 'green'::rainbow) ``` -------------------------------- ### Get B-Tree Multi-Page Statistics Source: https://www.postgresql.org/docs/19/pageinspect.html Retrieves statistics for a range of B-tree index pages. Specify the starting block number and the count of pages. A negative count retrieves all pages from the start block to the end. ```sql SELECT * FROM bt_multi_page_stats('pg_proc_oid_index', 5, 2); ``` -------------------------------- ### Sample Session: Executing SQL Commands with execq Source: https://www.postgresql.org/docs/19/spi-examples.html This sample session demonstrates various uses of the `execq` function, including table creation, insertion, selection, and handling of return values and row counts. Pay attention to the `INFO` messages indicating processed rows. ```sql => SELECT execq('CREATE TABLE a (x integer)', 0); execq ------- 0 (1 row) => INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)', 0)); INSERT 0 1 => SELECT execq('SELECT * FROM a', 0); INFO: EXECQ: 0 _-- inserted by execq_ INFO: EXECQ: 1 _-- returned by execq and inserted by upper INSERT_ execq ------- 2 (1 row) => SELECT execq('INSERT INTO a SELECT x + 2 FROM a RETURNING *', 1); INFO: EXECQ: 2 _-- 0 + 2, then execution was stopped by count_ execq ------- 1 (1 row) => SELECT execq('SELECT * FROM a', 10); INFO: EXECQ: 0 INFO: EXECQ: 1 INFO: EXECQ: 2 execq ------- 3 _-- 10 is the max value only, 3 is the real number of rows_ (1 row) => SELECT execq('INSERT INTO a SELECT x + 10 FROM a', 1); execq ------- 3 _-- all rows processed; count does not stop it, because nothing is returned_ (1 row) => SELECT * FROM a; x ---- 0 1 2 10 11 12 (6 rows) => DELETE FROM a; DELETE 6 => INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1); INSERT 0 1 => SELECT * FROM a; x --- 1 _-- 0 (no rows in a) + 1_ (1 row) => INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1); INFO: EXECQ: 1 INSERT 0 1 => SELECT * FROM a; x --- 1 2 _-- 1 (there was one row in a) + 1_ (2 rows) _-- This demonstrates the data changes visibility rule._ _-- execq is called twice and sees different numbers of rows each time:_ => INSERT INTO a SELECT execq('SELECT * FROM a', 0) * x FROM a; INFO: EXECQ: 1 _-- results from first execq_ INFO: EXECQ: 2 INFO: EXECQ: 1 _-- results from second execq_ INFO: EXECQ: 2 INFO: EXECQ: 2 INSERT 0 2 => SELECT * FROM a; x --- 1 2 2 _-- 2 rows * 1 (x in first row)_ 6 _-- 3 rows (2 + 1 just inserted) * 2 (x in second row)_ (4 rows) ``` -------------------------------- ### PL/pgSQL Event Trigger Function Example Source: https://www.postgresql.org/docs/19/plpgsql-trigger.html This example demonstrates a PL/pgSQL function designed to be used as an event trigger. It raises a NOTICE message indicating the event and command tag when a DDL command starts. ```plpgsql CREATE OR REPLACE FUNCTION snitch() RETURNS event_trigger AS $$ BEGIN RAISE NOTICE 'snitch: % %', tg_event, tg_tag; END; $$ LANGUAGE plpgsql; ``` ```sql CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE FUNCTION snitch(); ``` -------------------------------- ### ECPG SQL CONNECT Examples Source: https://www.postgresql.org/docs/current/ecpg-sql-connect.html Demonstrates various syntaxes for establishing SQL connections using ECPG, including different ways to specify database names, users, and connection strings. ```sql EXEC SQL CONNECT TO "connectdb" AS main; EXEC SQL CONNECT TO "connectdb" AS second; EXEC SQL CONNECT TO "unix:postgresql://200.46.204.71/connectdb" AS main USER connectuser; EXEC SQL CONNECT TO "unix:postgresql://localhost/connectdb" AS main USER connectuser; EXEC SQL CONNECT TO 'connectdb' AS main; EXEC SQL CONNECT TO 'unix:postgresql://localhost/connectdb' AS main USER :user; EXEC SQL CONNECT TO :db AS :id; EXEC SQL CONNECT TO :db USER connectuser USING :pw; EXEC SQL CONNECT TO @localhost AS main USER connectdb; EXEC SQL CONNECT TO REGRESSDB1 as main; EXEC SQL CONNECT TO AS main USER connectdb; EXEC SQL CONNECT TO connectdb AS :id; EXEC SQL CONNECT TO connectdb AS main USER connectuser/connectdb; EXEC SQL CONNECT TO connectdb AS main; EXEC SQL CONNECT TO connectdb@localhost AS main; EXEC SQL CONNECT TO tcp:postgresql://localhost/ USER connectdb; EXEC SQL CONNECT TO tcp:postgresql://localhost/connectdb USER connectuser IDENTIFIED BY connectpw; EXEC SQL CONNECT TO tcp:postgresql://localhost:20/connectdb USER connectuser IDENTIFIED BY connectpw; EXEC SQL CONNECT TO unix:postgresql://localhost/ AS main USER connectdb; EXEC SQL CONNECT TO unix:postgresql://localhost/connectdb AS main USER connectuser; EXEC SQL CONNECT TO unix:postgresql://localhost/connectdb USER connectuser IDENTIFIED BY "connectpw"; EXEC SQL CONNECT TO unix:postgresql://localhost/connectdb USER connectuser USING "connectpw"; EXEC SQL CONNECT TO unix:postgresql://localhost/connectdb?connect_timeout=14 USER connectuser; ``` -------------------------------- ### Linux/Unix archive_cleanup_command Example Source: https://www.postgresql.org/docs/current/pgarchivecleanup.html An example of configuring archive_cleanup_command on Linux/Unix systems, directing debugging output to a log file. This setup is suitable when the archive directory is accessed via NFS but files are local to the standby. ```bash archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>cleanup.log' ``` -------------------------------- ### Show Help Information Source: https://www.postgresql.org/docs/19/app-initdb.html Displays help about initdb command-line arguments and then exits. ```bash -? ``` ```bash --help ``` -------------------------------- ### Get Current Transaction Timestamp Source: https://www.postgresql.org/docs/19/functions-datetime.html Returns the current date and time at the start of the transaction. This is equivalent to `localtimestamp`. ```sql now() ``` -------------------------------- ### Manage Multiple Database Connections Source: https://www.postgresql.org/docs/19/ecpg-connect.html Example program demonstrating how to connect to multiple databases, execute queries on specific connections using AT, switch the current connection using SET CONNECTION, and finally disconnect all. ```c #include EXEC SQL BEGIN DECLARE SECTION; char dbname[1024]; EXEC SQL END DECLARE SECTION; int main() { EXEC SQL CONNECT TO testdb1 AS con1 USER testuser; EXEC SQL SELECT pg_catalog.set_config('search_path', '', false); EXEC SQL COMMIT; EXEC SQL CONNECT TO testdb2 AS con2 USER testuser; EXEC SQL SELECT pg_catalog.set_config('search_path', '', false); EXEC SQL COMMIT; EXEC SQL CONNECT TO testdb3 AS con3 USER testuser; EXEC SQL SELECT pg_catalog.set_config('search_path', '', false); EXEC SQL COMMIT; /* This query would be executed in the last opened database "testdb3". */ EXEC SQL SELECT current_database() INTO :dbname; printf("current=%s (should be testdb3)\n", dbname); /* Using "AT" to run a query in "testdb2" */ EXEC SQL AT con2 SELECT current_database() INTO :dbname; printf("current=%s (should be testdb2)\n", dbname); /* Switch the current connection to "testdb1". */ EXEC SQL SET CONNECTION con1; EXEC SQL SELECT current_database() INTO :dbname; printf("current=%s (should be testdb1)\n", dbname); EXEC SQL DISCONNECT ALL; return 0; } ``` -------------------------------- ### Build and Install All Contrib Modules Source: https://www.postgresql.org/docs/current/contrib.html Run 'make' and 'make install' in the 'contrib' directory to build and install all optional components. Ensure the PostgreSQL source tree is configured first. ```bash make make install ``` -------------------------------- ### Get Current Timestamp with Precision Source: https://www.postgresql.org/docs/19/functions-datetime.html Retrieves the current date and time at the start of the transaction with specified precision. ```sql localtimestamp(2) ``` -------------------------------- ### Execute Tutorial SQL Script Source: https://www.postgresql.org/docs/19/tutorial-sql-intro.html Connect to your 'mydb' database using 'psql' in single-step mode and execute the 'basics.sql' script using the '\i' command. ```bash $ psql -s mydb mydb=> \i basics.sql ``` -------------------------------- ### ssl_cipher() Source: https://www.postgresql.org/docs/19/sslinfo.html Gets the name of the cipher suite employed for the current SSL connection. An example cipher is DHE-RSA-AES256-SHA. ```APIDOC ## ssl_cipher() ### Description Returns the name of the cipher used for the SSL connection (e.g., DHE-RSA-AES256-SHA). ### Returns - text: The name of the cipher suite. ``` -------------------------------- ### Install PostgreSQL Documentation Source: https://www.postgresql.org/docs/19/install-make.html Installs the HTML and man page documentation for PostgreSQL. ```bash make install-docs ``` -------------------------------- ### Get Current Transaction Timestamp (Alternative) Source: https://www.postgresql.org/docs/19/functions-datetime.html Returns the current date and time at the start of the transaction. This is equivalent to `localtimestamp` and `now()`. ```sql transaction_timestamp() ``` -------------------------------- ### Create User Mapping Example Source: https://www.postgresql.org/docs/19/sql-createusermapping.html Example of creating a user mapping for a specific user 'bob' to a server named 'foo', including authentication details. ```sql CREATE USER MAPPING FOR bob SERVER foo OPTIONS (user 'bob', password 'secret'); ``` -------------------------------- ### Starting a Transaction Block in PostgreSQL Source: https://www.postgresql.org/docs/current/sql-begin.htm This example demonstrates the basic usage of the BEGIN command to initiate a transaction block in PostgreSQL. ```sql BEGIN; ``` -------------------------------- ### Get a Range of Enum Values Source: https://www.postgresql.org/docs/19/functions-enum.html Retrieves a subset of values from the 'rainbow' enum, starting from 'orange' and ending at 'green'. The range is inclusive. ```sql enum_range('orange'::rainbow, 'green'::rainbow) ``` -------------------------------- ### Setup PostgreSQL Test Database for intarray Benchmark Source: https://www.postgresql.org/docs/current/intarray.html Sets up a new PostgreSQL database named 'TEST' and creates the 'intarray' extension within it, preparing the environment for running benchmark tests. ```bash cd .../contrib/intarray/bench createdb TEST psql -c "CREATE EXTENSION intarray" TEST ``` -------------------------------- ### Install New PostgreSQL Binaries from Source Source: https://www.postgresql.org/docs/19/pgupgrade.html For source installations, use the 'make prefix' command to specify a custom installation location for the new PostgreSQL binaries and support files. ```bash make prefix=/usr/local/pgsql.new install ``` -------------------------------- ### Manual Installation of PL/Perl: Language Declaration Source: https://www.postgresql.org/docs/19/xplang-install.html Example of declaring PL/Perl as a trusted language, linking it to its handler, inline, and validator functions. ```sql CREATE TRUSTED LANGUAGE plperl HANDLER plperl_call_handler INLINE plperl_inline_handler VALIDATOR plperl_validator; ``` -------------------------------- ### Setup PostgreSQL for Coverage Testing (Meson) Source: https://www.postgresql.org/docs/current/regress-coverage.html Configure the build with Meson to enable coverage testing. This is the initial step for using Meson's build system with coverage instrumentation. ```bash meson setup -Db_coverage=true ... OTHER OPTIONS ... builddir/ ```