InspIRCd v4 is still early in development!

If you use this branch you may experience crashes, weird behaviour, and unannounced breaking changes.

You probably want to use InspIRCd v3 instead.

The "pgsql" Module (v4)

This module depends on a third-party library (libpq) and must be manually enabled at compile time.

Once you have installed the dependency you can enable this module using the following command:

./configure --enable-extras pgsql


This module provides the ability for SQL modules to query a PostgreSQL database.


To load this module use the following <module> tag:

<module name="pgsql">


The <database> tag defines a PostgreSQL database to connect to. This tag can be defined as many times as required.

Name Type Default Value Description
module Text None Required! This MUST be set to "pgsql" to connect to a PostgreSQL database.
id Text None Required! The name that SQL-using modules can refer to this <database> tag using.
host Text None Required! The hostname or IP address of a PostgreSQL server.
port Number None Required! The port on which the PostgreSQL server is listening.
tls Boolean No Whether to connect to the PostgreSQL server using TLS (SSL).
user Text None Required! The username to log into the PostgreSQL server with.
pass Text None Required! The password to log into the PostgreSQL server with.
name Text None Required! The name of the PostgreSQL database to use.
Example Usage
<database module="pgsql"