@@ -13,73 +13,99 @@ Installation
1313
1414To build semver:
1515
16- make
17- make install
18- make installcheck
16+ ``` sh
17+ make
18+ make install
19+ make installcheck
20+ ```
1921
2022If you encounter an error such as:
2123
22- "Makefile", line 8: Need an operator
24+ ```
25+ "Makefile", line 8: Need an operator
26+ ```
2327
2428You need to use GNU make, which may well be installed on your system as
2529` gmake ` :
2630
27- gmake
28- gmake install
29- gmake installcheck
31+ ``` sh
32+ gmake
33+ gmake install
34+ gmake installcheck
35+ ```
3036
3137If you encounter an error such as:
3238
33- make: pg_config: Command not found
39+ ```
40+ make: pg_config: Command not found
41+ ```
3442
3543Be sure that you have ` pg_config ` installed and in your path. If you used a
3644package management system such as RPM to install PostgreSQL, be sure that the
3745` -devel ` package is also installed. If necessary tell the build process where
3846to find it:
3947
40- env PG_CONFIG=/path/to/pg_config make && make installcheck && make install
48+ ``` sh
49+ env PG_CONFIG=/path/to/pg_config make && make installcheck && make install
50+ ```
4151
4252If you encounter an error such as:
4353
44- ERROR: must be owner of database regression
54+ ```
55+ ERROR: must be owner of database regression
56+ ```
4557
4658You need to run the test suite using a super user, such as the default
4759"postgres" super user:
4860
49- make installcheck PGUSER=postgres
61+ ``` sh
62+ make installcheck PGUSER=postgres
63+ ```
5064
5165To install the extension in a custom prefix on PostgreSQL 18 or later, pass
5266the ` prefix ` argument to ` install ` (but no other ` make ` targets):
5367
54- make install prefix=/usr/local/extras
68+ ``` sh
69+ make install prefix=/usr/local/extras
70+ ```
5571
5672Then ensure that the prefix is included in the following [ ` postgresql.conf `
5773parameters] :
5874
59- extension_control_path = '/usr/local/extras/postgresql/share:$system'
60- dynamic_library_path = '/usr/local/extras/postgresql/lib:$libdir'
75+ ``` ini
76+ extension_control_path = ' /usr/local/extras/postgresql/share:$system'
77+ dynamic_library_path = ' /usr/local/extras/postgresql/lib:$libdir'
78+ ```
6179
6280Once semver is installed, you can add it to a database. If you're running
6381PostgreSQL 9.1.0 or greater, it's a simple as connecting to a database as a
6482super user and running:
6583
66- CREATE EXTENSION semver;
84+ ``` sql
85+ CREATE EXTENSION semver;
86+ ```
6787
6888If you've upgraded your cluster to PostgreSQL 9.1 and already had semver
6989installed, you can upgrade it to a properly packaged extension with:
7090
71- CREATE EXTENSION semver FROM unpackaged;
91+ ``` sql
92+ CREATE EXTENSION semver FROM unpackaged;
93+ ```
7294
7395For versions of PostgreSQL less than 9.1.0, you'll need to run the
7496installation script:
7597
76- psql -d mydb -f /path/to/pgsql/share/contrib/semver.sql
98+ ``` sh
99+ psql -d mydb -f /path/to/pgsql/share/contrib/semver.sql
100+ ```
77101
78102If you want to install semver and all of its supporting objects into a
79103specific schema, use the ` PGOPTIONS ` environment variable to specify the
80104schema, like so:
81105
82- PGOPTIONS=--search_path=extensions psql -d mydb -f semver.sql
106+ ``` sh
107+ PGOPTIONS=--search_path=extensions psql -d mydb -f semver.sql
108+ ```
83109
84110Dependencies
85111------------
@@ -89,7 +115,7 @@ for testing, PL/pgSQL.
89115Copyright and License
90116---------------------
91117
92- Copyright (c) 2010-2024 The pg-semver Maintainers: David E. Wheeler, Sam
118+ Copyright (c) 2010-2025 The pg-semver Maintainers: David E. Wheeler, Sam
93119Vilain, Tom Davis, and Xavier Caron.
94120
95121This module is free software; you can redistribute it and/or modify it under
0 commit comments