PostgreSQL Development Notes
Run Tests
./configure --enable-tap-tests
make check
Build Docs
Some build artifacts are not removed by
make clean,
so try
git clean -xdf
if the docs build fails.
make STYLE=website html
Serve using
python3 -m http.server --directory doc/src/sgml/html 8000
Add New Function
pg_proc.dat
contains the catalog of build-in Postgres functions.
Use
src/include/catalog/unused_oids
to find an unused OID.
Confirm the new ID
SELECT oid FROM pg_proc WHERE proname = 'to_oct';
Generating a Patch
git diff HEAD^ HEAD > add-function-to_oct.patch
Apply using
patch -p1 < add-function-to_oct.patch
References
Building on FreeBSD
cp /usr/ports/databases/postgresql17-server/work/postgresql-17.10/src/template/freebsd src/template/ ./configure --prefix=/usr/local/pg19 --with-libraries=/usr/local/lib --with-includes=/usr/local/include gmake all doas gmake install cd contrib gmake doas gmake install