No description
Find a file
Greenbone Bot 01f3d20955
Some checks failed
Build and test C / Build and test (push) Has been cancelled
Build and test C / Build and test-1 (push) Has been cancelled
Build and test C / Check CMake Formatting (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Build and Push Container Images / Build and Push Container Images (default) (push) Has been cancelled
Build and Push Container Images / Build and Push Container Database Migration Image (push) Has been cancelled
Build and Push Container Images / notify (push) Has been cancelled
Build and Push Container Images / trigger-replication (push) Has been cancelled
SBOM upload / SBOM-upload (push) Has been cancelled
Fix Add or Update detect-hidden-unicode.yml (#113)
2026-01-15 09:35:51 +01:00
.devcontainer Add a devcontainer setup for pg-gvm 2025-08-12 11:30:22 +02:00
.docker Avoid running apt update for every postgres version in migrator image 2026-01-09 10:10:36 +01:00
.github Fix Add or Update detect-hidden-unicode.yml (#113) 2026-01-15 09:35:51 +01:00
cmake remove: Use FindPostgres and FindPackageHandleStandardsArgs from cmake 2025-08-12 11:30:22 +02:00
docs Improve pg-gvm upgrade docs for using the pre-build image 2026-01-09 10:10:36 +01:00
include Change Company name to Greenbone AG (#49) 2023-04-25 12:50:17 +00:00
sql Fix: Add missing migration from pg-gvm 22.5 to 22.6 2023-07-26 10:48:34 +02:00
src Change Company name to Greenbone AG (#49) 2023-04-25 12:50:17 +00:00
tests Add reference time param to iCal pgTAP tests 2022-05-03 16:51:30 +02:00
.dockerignore change: Use up to date tooling for installing dependencies 2025-08-12 11:30:22 +02:00
.gersemirc ci: Add workflow for checking the CMake file format 2025-04-11 16:12:33 +02:00
.gitignore Add .gitignore file 2025-08-12 11:30:22 +02:00
.mergify.yml Add config settings for mergify 2022-08-22 12:30:43 +02:00
cliff.toml misc: Improve Release Changelog Generation 2025-03-14 11:44:19 +01:00
CMakeLists.txt Automatic adjustments after release [skip ci] 2026-01-12 08:33:51 +00:00
control.in Fix: Fix versioning of control file for 22.5 2023-06-20 12:57:46 +02:00
gvmd-tables.sql Make CI work without building gvmd 2021-02-16 14:44:25 +01:00
LICENSE Changed license from AGPL to GPL. 2020-10-20 10:28:58 +02:00
pg-gvm-make-dev-links.in Change Company name to Greenbone AG (#49) 2023-04-25 12:50:17 +00:00
README.md Docs: add usage guide for PostgreSQL upgrade migrator 2026-01-08 13:06:33 +01:00
VERSION.in Initial cmake files and README. 2020-09-25 12:59:00 +02:00

Greenbone Logo

Greenbone Library for PostgreSQL utility functions

This library contains PostgreSQL utility functions. For example to compute host and ical information within SQL statements.

Build and Installation

Prerequisites

  • GCC
  • cmake >= 3.5
  • pkg-config
  • libical >= 1.0.0
  • glib >= 2.42
  • PostgreSQL dev >= 9.6
  • libgvm-base >= 20.8

Install these packages using (on Debian GNU/Linux bookworm 12):

apt-get install gcc cmake pkg-config libical-dev libglib2.0-dev postgresql-server-dev-15

and build the gvm-libs as described in the README.

Configure and Build

This extension can be configured, built and installed with the following commands:

cmake .
make && make install

Use the extension

To use the extension in a database create the extension using

CREATE EXTENSION "pg-gvm";

Test the extension

The tests are based on pgTAP, a unit test tool for PostgreSQL Databases.

Setup for tests

Install pgTAP cloning the repository

and follow the instructions in the setup documentation

Integration

To use pgTAP in a database use

CREATE EXTENSION IF NOT EXISTS pgtap;

as postgres user. To check if the extension exists use

\dx

Running the tests

The tests are located in the tests folder of this repository.

As postgres user run (replace MY_DATABASE with the real name of the database)

pg_prove -d MY_DATABASE tests/*.sql

Support

For any question on the usage of pg-vgm please use the Greenbone Community Forum. If you found a problem with the software, please create an issue on GitHub. If you are a Greenbone customer you may alternatively or additionally forward your issue to the Greenbone Support Portal.

Maintainer

This project is maintained by Greenbone AG.

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at github first.

CMake formatting

All CMake files are formatted using gersemi. To install gersemi on a Debian based system the following commands can be used:

sudo apt install pipx
pipx install gersemi

To format all CMake files run the command:

gersemi -i cmake .

License

Copyright (C) 2025 Greenbone AG

Licensed under the GNU General Public License v3.0 or later.