Database Reference
In-Depth Information
have many PLs to choose from. This opens the door for more complex abstraction
using views.
• Improvements added by the KNN GiST index to popular extensions, such as full-
text searchs, trigrams (for fuzzy search and case-insensitive search), and PostGIS.
Database Drivers
If you're using or plan to use PostgreSQL, chances are that you're not going to use it in
a vacuum. To have it interact with other applications,you need a database driver. Post‐
greSQL enjoys a generous number of freely available drivers supporting many pro‐
gramming languages and tools. In addition, various commercial organizations provide
drivers with extra bells and whistles at modest prices. Several popular open source
drivers are available:
• PHP is a common language used to develop web applications, and most PHP dis‐
tributions come packaged with at least one PostgreSQL driver: the old pgsql driver
and the newer pdo_pgsql. You may need to enable them in your
php.ini
, but they're
usually already installed.
• For Java development, the JDBC driver keeps up with latest PostgreSQL versions.
Download it from
PostgreSQL
.
• For .NET (both Microsoft or Mono), you can use the
Npgsql
driver. Both the source
code and the binary are available for .NET Framework 3.5 and later, Microsoft
Entity Framework, and Mono.NET.
• If you need to connect from Microsoft Access, Office productivity software, or any
other products that support Open Database Connectivity (ODBC), download driv‐
ers from
PostgreSQL
.
The link leads you to both 32-bit and 64-bit ODBC drivers.
• LibreOffice 3.5 (and later) comes packaged with a native PostgreSQL driver. For
OpenOffice and older versions of LibreOffice, you can use the JDBC driver or the
SDBC driver. You can learn more details from our article
OO Base and PostgreSQL
.
• Python has support for PostgreSQL via various
Python database drivers
; at the
moment,
psycopg
is the most popular. Rich support for PostgreSQL is also available
in the
Django
web framework
• If you use Ruby, connect to PostgreSQL using
rubygems pg
.
• You'll find Perl's connectivity support for PostgreSQL in the DBI and the DBD::Pg
• Node.js is a framework for running scalable network programs written in Java‐
Script. It is built on the Google V8 engine. There are three PostgreSQL drivers