No description
  • C 42.6%
  • CMake 21.1%
  • Shell 19%
  • PLpgSQL 9.5%
  • Dockerfile 7.8%
Find a file
Björn Ricks 07bc984e2d
Some checks failed
container.yml / CI: Change release workflow to not bypass branch protection rules (push) Failing after 0s
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
SBOM upload / SBOM-upload (push) Has been cancelled
CI: Change release workflow to not bypass branch protection rules
Branch protection rules will be replaced with rulesets which allow
specific users to bypass rules.
2026-08-28 10:45:39 +02:00
.devcontainer
.docker
.github CI: Change release workflow to not bypass branch protection rules 2026-08-28 10:45:39 +02:00
cmake
docs
include
sql
src
tests
.dockerignore
.gersemirc
.gitignore
.mergify.yml
cliff.toml
CMakeLists.txt Automatic adjustments after release [skip ci] 2026-07-06 07:49:10 +00:00
control.in
gvmd-tables.sql
LICENSE
pg-gvm-make-dev-links.in
README.md Change LOGO in README.md 2026-07-17 14:10:39 +02:00
VERSION.in

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.18
  • 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) 2026 Greenbone AG

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