Accessing Postgresql via Julia



I am currently using R to access a remote Postgresql database, and my code looks like those as below:

wrds <- dbConnect(Postgres(), 

I would like to know how to do it in Julia.


Have a look at this thread where people helped me a lot:


ODBC.jl provides access to any database that supports an ODBC driver; Postgres has excellent support for ODBC. For windows, I’d downloads the msi folder version for an easy installer, for other unix platforms, just grab the tarball from the src directory. You can setup an ODBC dsn file like the one used for testing, which can be registered w/ your system ODBC via the command odbcinst -i -s -h -f ./test/pgtest.odbc.ini.

As noted elsewhere, it takes a bit more setup, but once you’ve been thru it once or twice, I find it much easier to setup any other database.


By the way, on ODBC master on 0.6.1 I’m getting

ERROR: LoadError: LoadError: LoadError: UndefVarError: @isdefined not defined
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:576
 [4] include(::String) at ./sysimg.jl:14
 [5] include_from_node1(::String) at ./loading.jl:576
 [6] eval(::Module, ::Any) at ./boot.jl:235
 [7] _require(::Symbol) at ./loading.jl:490
 [8] require(::Symbol) at ./loading.jl:405


Just want to see if there is any update on this