Skip to main content

PostgreSQL bindings for Python w/ bind parameters support

Project description

This is a set of Python bindings for PostgreSQL derived from the PyGreSQL 3.8.1
sources. The main changes from the PyGreSQL module are:

* support for bind parameters, alleviating the need for extensive,
expensive and vulnerable quoting of user-supplied data
* support for server side cursors for looping through large query
results without loading up the entire result set in the client's memory
* returned values are translated to Python objects in the C layer,
resulting in some speed improvement
* DB API 2.0 compliance, with some extensions


PostgreSQL allows for numeric parameters to be passed in a query (bind
parameters). If parameters are used, they are referred to in the query string as
$1, $2, etc. Bind parameters are passed in as a tuple that holds the values
bound in the query. The primary advantage of using bind parameters is that
parameter values may be separated from the command string, thus avoiding the
need for tedious and error-prone quoting and escaping.

Because of the different query syntax between what PostgreSQL natively
supports and what PyGreSQL used to implement (Python style substitutions like %s
and %(name)s), these bindings will not grok SQL queries written for PyGreSQL -
you might need to slightly rework some of your queries to take advantage of the
bind parameter support.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-pgsql-0.9.7.tar.gz (35.4 kB view details)

Uploaded Source

File details

Details for the file python-pgsql-0.9.7.tar.gz.

File metadata

  • Download URL: python-pgsql-0.9.7.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-pgsql-0.9.7.tar.gz
Algorithm Hash digest
SHA256 05bba89f6b29b05b472d03e50da3215f6644c7dcb6610c760295de319a4ba947
MD5 c40ab161f702da631e5fb294f957ff9d
BLAKE2b-256 48159f16013a66c218a8ad927a164f003207f9bdf7706a82b9af89888ba9cd84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page