I'm searching for a way to interact with a PostgreSQL database from an AHK script. All the ways I currently found include running psql.exe from the command-line and then parsing output. Of course, this leads to incredibly poor performance (execute process each time).
The question is, are there any ways to interact with database directly? Something that would allow you to connect and send queries via DllCall
or another similar method known from other languages?
The library should make it possible to do something like:
psql_connection := psql_connect("localhost", "5432", "postgres", "dbpass", "TestDB")
rows := psql_query(psql_connection, "select * from TestTable limit 10") ; returns array of objects
libpq
andlibpqtypes
, orlibpqxx
, directly might be easier. – Craig Ringer