View Single Post
Author Message
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-04-2014 , 14:26   PostgreSQL Database Interface
Reply With Quote #1

This driver is now included in SourceMod starting with version 1.11.0.6666.

This extension provides PostgreSQL database support to SourceMod. There is a bug report open for this, but i don't use pgsql so i can't test it in a production environment. Putting it up here to see if someone got a use for it and confirms it does what you expect.

The extension is currently compiled against postgresql 9.3.2.
It registers a "pgsql" database driver. To use this, just set the "driver" key in the databases.cfg section to "pgsql" like this:

Code:
    "pgtest"
    {
        "driver" "pgsql"
        "host" "localhost"
        "database" "my_database"
        "user" "user"
        "pass" "password"
    }
Installation
1. Drag & Drop

Due to syntax differences in the SQL flavours between MySQL, sqlite and PostgreSQL you can't be sure that all plugins will run out of the box with pgsql. You might need to slightly alter your queries depending on the used database driver. Just like you already have to do with different sql syntax between mysql and sqlite!

Latest builds against SM 1.10 and PostgreSQL 9.6.9 HERE.

This extension is compiled against SourceMod 1.6 and won't run on SM 1.5. This is due to some refactoring of the DBI system in 1.6 and me being too lazy to backport the extension to 1.5!
Attached Files
File Type: dll dbi.pgsql.ext.dll (115.0 KB, 298 views)
File Type: so dbi.pgsql.ext.so (179.8 KB, 526 views)
File Type: zip sm-pgsql.zip (2.66 MB, 463 views)
__________________

Last edited by Peace-Maker; 03-11-2021 at 07:00. Reason: Merged upstream
Peace-Maker is offline