| Start |
|---|
| Accessing PostgreSQL with the C-API The C-API is the most powerful way to access PostgreSQL and it is surprisingly comfortable. Compilation and linkingDuring compilation, you have to add the PostgreSQL include directory, which can be found with Note: For historical reason, the library is called Given that the below code sample is in file with the GNU C compiler (consider adding on Windows with Microsoft Visual C. Sample program |
| Accessing Postgresql from .NET using the Npgsql provider One of the more popular .NET providers for Postgresql is Npgsql (opens new window), which is ADO.NET compatible and is used nearly identically as other .NET database providers. A typical query is performed by creating a command, binding parameters, and then executing the command. In C#: |
| Accessing PostgreSQL from python using psycopg2 You can find description of the driver here (opens new window). The quick example is: Will result: |
| Accessing PostgreSQL from PHP using Pomm2 On the shoulders of the low level drivers, there is pomm (opens new window). It proposes a modular approach, data converters, listen/notify support, database inspector and much more. Assuming, Pomm has been installed using composer, here is a complete example: Pomm’s query manager module escapes query arguments to prevent SQL injection. When the arguments are cast, it also converts them from a PHP representation to valid Postgres values. The result is an iterator, it uses a cursor internally. Every row is converted on the fly, booleans to booleans, timestamps to \DateTime etc. |
Read Article
https://develop.horje.com/learn/1434/reference