@@ -17,74 +17,114 @@ be installed remotely.
1717
1818To build it, just do this:
1919
20- make
21- make install
22- make installcheck
20+ ``` sh
21+ make
22+ make install
23+ make installcheck
24+ ```
2325
2426If you encounter an error such as:
2527
26- "Makefile", line 8: Need an operator
28+ ```
29+ "Makefile", line 8: Need an operator
30+ ```
2731
2832You need to use GNU make, which may well be installed on your system as
2933` gmake ` :
3034
31- gmake
32- gmake install
33- gmake installcheck
35+ ``` sh
36+ gmake
37+ gmake install
38+ gmake installcheck
39+ ```
3440
3541If you encounter an error such as:
3642
37- make: pg_config: Command not found
38-
43+ ```
44+ make: pg_config: Command not found
45+ ```
3946Or:
4047
41- Makefile:52: *** pgTAP requires PostgreSQL 9.1 or later. This is . Stop.
48+ ```
49+ Makefile:52: *** pgTAP requires PostgreSQL 9.1 or later. This is . Stop.
50+ ```
4251
4352Be sure that you have ` pg_config ` installed and in your path. If you used a
4453package management system such as RPM to install PostgreSQL, be sure that the
4554` -devel ` package is also installed. If necessary tell the build process where
4655to find it:
4756
48- env PG_CONFIG=/path/to/pg_config make && make install && make installcheck
57+ ``` sh
58+ env PG_CONFIG=/path/to/pg_config make && make install && make installcheck
59+ ```
4960
5061And finally, if all that fails, copy the entire distribution directory to the
5162` contrib/ ` subdirectory of the PostgreSQL source tree and try it there without
5263` pg_config ` :
5364
54- env NO_PGXS=1 make && make install && make installcheck
65+ ``` sh
66+ env NO_PGXS=1 make && make install && make installcheck
67+ ```
5568
5669If you encounter an error such as:
5770
58- ERROR: must be owner of database regression
71+ ```
72+ ERROR: must be owner of database regression
73+ ```
5974
6075You need to run the test suite using a super user, such as the default
6176"postgres" super user:
6277
63- make installcheck PGUSER=postgres
78+ ```
79+ make installcheck PGUSER=postgres
80+ ```
6481
6582If you encounter an error such as:
6683
67- ERROR: Missing extensions required for testing: citext isn ltree
84+ ```
85+ ERROR: Missing extensions required for testing: citext isn ltree
86+ ```
6887
6988Install the PostgreSQL
7089[ Additional Supplied Modules] ( https://www.postgresql.org/docs/current/contrib.html ) ,
7190which are required to run the tests. If you used a package management system
7291such as RPM to install PostgreSQL, install the ` -contrib ` package.
7392
93+ To install the extension in a custom prefix on PostgreSQL 18 or later, pass
94+ the ` prefix ` argument to ` install ` (but no other ` make ` targets):
95+
96+ ``` sh
97+ make install prefix=/usr/local/extras
98+ ```
99+
100+ Then ensure that the prefix is included in the following [ ` postgresql.conf `
101+ parameters] :
102+
103+ ``` ini
104+ extension_control_path = ' /usr/local/extras/postgresql/share:$system'
105+ dynamic_library_path = ' /usr/local/extras/postgresql/lib:$libdir'
106+ ```
107+
74108Once pgTAP is installed, you can add it to a database by connecting as a super
75109user and running:
76110
77- CREATE EXTENSION pgtap;
111+ ``` sql
112+ CREATE EXTENSION pgtap;
113+ ```
78114
79115If you've upgraded your cluster to PostgreSQL 9.1 and already had pgTAP
80116installed, you can upgrade it to a properly packaged extension with:
81117
82- CREATE EXTENSION pgtap FROM unpackaged;
118+ ``` sql
119+ CREATE EXTENSION pgtap FROM unpackaged;
120+ ```
83121
84122If you want to install pgTAP and all of its supporting objects into a specific
85123schema, use the ` SCHEMA ` clause to specify the schema, like so:
86124
87- CREATE EXTENSION pgtap SCHEMA tap;
125+ ``` sql
126+ CREATE EXTENSION pgtap SCHEMA tap;
127+ ```
88128
89129Dependencies
90130------------
@@ -94,7 +134,7 @@ pgTAP requires PostgreSQL 9.1 or higher.
94134Copyright and License
95135---------------------
96136
97- Copyright (c) 2008-2023 David E. Wheeler. Some rights reserved.
137+ Copyright (c) 2008-2025 David E. Wheeler. Some rights reserved.
98138
99139Permission to use, copy, modify, and distribute this software and its
100140documentation for any purpose, without fee, and without a written agreement is
0 commit comments