Php Postgresql

There are several Python drivers for PostgreSQL. This is the incomplete feature matrix for them; please help complete it as you see fit.

In general, Python users want to use psycopg2 unless they have a strong reason to try another driver, most of which are no longer maintained. Since DBAPI allows drivers to have different semantics, porting applications from one driver to another is non-trivial.

SoftwareLicensePlatformsPython versionsDB API 2.0Native (uses libpq)Last ReleaseNotes
Psycopg2LGPLUnix, Win322.6-3.6yesyes2019Most popular python driver, required for most Python+Postgres frameworks
pg8000BSDany (pure Python)3.3+yesno2019Used by Web2Py. current updated official site
py-postgresqlBSDany (pure Python)3.0+yesno2018Pure Python with optional C accelerator modules,<br>extensive custom API. Python 3 only.
PyGreSQLBSDUnix, Win322.6 thru 3.6yesyes2017The first PostgreSQL adapter for Python. Still actively maintained.
ocpgdbBSDUnix2.3-2.6yesyes2010PG8.1+
bpgsql LGPLany (pure Python)2.3-2.6yesno2009labeled alpha
aiopgBSDany3.52+(ish)Native2019

PostgreSQL SUBSTRING function using Column: Sample Table: employees. If we want to display the employeeid, first name and 1st 4 characters of firstname for those employees who belong to the department which departmentid is below 50 from employees table, the following SQL can be executed. Summary: in this tutorial, you will learn how to create new tables in the PostgreSQL database using PHP PDO API. Creating new tables using PHP PDO steps. To create new tables in a PostgreSQL database using PHP PDO, you use the following steps: First, connect to the database by creating a new PDO object. Second, call the exec method of the PDO object to execute the CREATE TABLE statement. PHP will return values of PostgreSQL boolean datatype as single character strings 't' and 'f', not PHP true and false. Editor's Note 't' or 'f' is valid boolean expression for PostgreSQL. All values from PostgreSQL are strings, since PostgreSQL integer, float may be much larger than PHP's native int, double can handle.

Php Postgresql Tutorial

Php postgresql install

Php Postgresql Blob

More abandoned driver projects:

  • pgasync, Twisted-native driver, no updates since 2005
  • PoPy, no updates since 2003 - development was merged with pygresql
  • pyPgSQL, no updates since 2006

There is similar page on the Python wiki

Retrieved from 'https://wiki.postgresql.org/index.php?title=Python&oldid=34420'