[HACKERS] Libpq in VS 2010
I needed to talk to the database from an app that builds in Visual Studio 2010 only at the moment. The binary that EnterpriseDB provides for windows was built with VS2005 I think and causes the weird error linking of "cannot open Files.obj" (there is no Files.cpp) I was able to download the source and get just libpq.lib (and the dll) built and am testing it in my project, it loads and sends queries to DB. I downloaded source and ran the "perl mkvcbuild.pl" I opened solution in VS2008 letting it convert project. I opened in VS2010 and let it convert the VS2008 project. Now I added to the linker properties for the libpq project ws2_32.lib,secur32.lib,wldap32.lib and then the libpq.def file I built just the libpq project and am using the libpq.lib it created. I hope we get the full build later, I really need to remove a lot of cruft for an embedded target.
[HACKERS] Libpq enhancement
I am wondering If I am missing something obvious. If not, I have a suggestion for plpgsql. Stored procedures can accept rows. Libpq can receive rows (PQResult). Wouldn't it be a great interface if PQResult was "bi-directional"? Create a result set on the client then call the database with a command. Perhaps... PQinsert(PQResult,"schema.table"); //iterate thru rows inserting PQupdate(PQResult,"schema.table"); //iterate thru rows updateing PQexec(connection,"scheme.function",PQResult) //iterate thru rows passing row as arg to stored procedure.