Skip to content

Latest commit

History

91 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

PostgreSQL.jl

Build StatusCoverage Statuscodecov.io

An interface to PostgreSQL from Julia. Uses libpq (the C PostgreSQL API) and obeys the DBI.jl protocol.

Usage

using DBI
using PostgreSQL
conn =connect(Postgres, "localhost", "username", "password", "dbname", 5432)
stmt =prepare(conn, "SELECT 1::bigint, 2.0::double precision, 'foo'::character varying, "*"'foo'::character(10);")
result =execute(stmt)
for row in result
# codeendfinish(stmt)
disconnect(conn)

Block Syntax

using DBI
using PostgreSQL
connect(Postgres, "localhost", "username", "password", "dbname", 5432) do conn
#codeend

Requirements

Tests require a local PostgreSQL server with a postgres user/database (installed by default with PostgreSQL server installations) with trusted authentication from localhost.

Systems

  • Tested on Funtoo Linux and Windows 8
  • Should work on other systems provided libpq is avaiable (please file an issue if this is not the case)

TODO (soon)

  • Implement more default PostgreSQL type handling
  • Test type handling overrides
  • More comprehensive error handling and tests
  • Support for COPY

TODO (not soon)

  • Asynchronous connection support
  • Asynchronous Julia for handling asynchronous connections
  • Testing and compatibility with multiple versions of PostgreSQL and libpq

About

PostgreSQL DBI driver

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages