sourcemod/extensions/pgsql
Corey D c5087d7a39
database: flip to recursive_mutex to allow nested locks (#1937)
* Fix crash from db locking

* Change db lock to use recursive_mutex
2023-03-29 20:03:03 -07:00
..
lib_darwin Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
lib_darwin64 Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
lib_linux Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
lib_linux64 Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
lib_win Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
lib_win64 Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
pgsql database: flip to recursive_mutex to allow nested locks (#1937) 2023-03-29 20:03:03 -07:00
AMBuilder Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
extension.cpp Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
extension.h Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
libpq-fe.h Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
postgres_ext.h Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
README.md Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
smsdk_config.h Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00
version.rc Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00

PostgreSQL Build Instructions

As of writing, we're using PostgreSQL v9.6.9

https://www.postgresql.org/ftp/source/

After building, libpq can be found in src/interfaces/libpq/

Windows

https://www.postgresql.org/docs/9.6/install-windows-libpq.html

Change src/interfaces/win32.mak line 35 from OPT=/O2 /MD to OPT=/O2 /MT. Library will be in interfaces\libpq\Release\libpq.lib. You have to delete the interfaces\libpq\Release folder between x86 and x86_64 builds.

Mac

For x86 or x86_64 add -m32 or -m64 to CFLAGS

CFLAGS='-mmacosx-version-min=10.7' ./configure && make

Linux

For x86 or x86_64 add -m32 or -m64 to CFLAGS

CFLAGS='-fPIC' ./configure --without-readline && make