Hey Ross,

Just confirmed that connecting to Postgres does indeed work; haven't seen
any issues yet. I'm using the PostgreSQL ODBC Driver from their website
with unixODBC on a mac. I'm using a connection string I built by following
the guidelines here:
http://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/

Here's a little sample code (I have more testing all the various data types
in Postgres, but I won't post the full snippet here):

using ODBC

dsn =
ODBC.DSN("Driver={PostgreSQL};Server=[server];Port=5432;Database=testdb;Uid=username;Pwd=password")

# Check some basic queries
dbs = ODBC.query(dsn, "SELECT datname FROM pg_database WHERE datistemplate
= false;")
data = ODBC.query(dsn, "SELECT table_schema,table_name FROM
information_schema.tables ORDER BY table_schema,table_name;")


The latest ODBC release was just merged in METADATA.jl, so if you do
Pkg.add("ODBC") you should get the latest release/code. If you already had
it installed, just run Pkg.update() to get the latest release.

Good luck!

-Jacob

On Tue, May 3, 2016 at 7:11 PM, Boylan, Ross <[email protected]> wrote:

> Attempting to post comments inline, even though my mailer is allergic.
> Look for >>
>
>
> From: [email protected] [[email protected]] on behalf of Jacob Quinn [
> [email protected]]
> Sent: Tuesday, May 03, 2016 5:47 PM
>
> I'm not sure I understand: I don't see DBI.jl nor PostgreSQL.jl at
> pkg.julialang.org, which tells me they aren't officially registered as
> packages. The difficulties you're seeing then aren't that surprising
> because they haven't felt comfortable enough to officially register.
>
> >> You're right.  I got to them through https://github.com/JuliaDB
>
> ODBC actually works fine on Linux/OSX through the unixODBC library. It can
> be installed through a variety of means, but works quite well from what
> I've seen. Postgres is actually next on my list to test with ODBC (so far
> the testing has focused
>  on Teradata, SQL Server, and MySQL), so if I find time in the next few
> days, I'll try to put together an example and share it here.
> >>  The status page indicates errors with julia 0.4 and Linux.  Does it
> matter?  Clicking on the build logs it appears the most recent build for
> 0.4, 124.4 (https://travis-ci.org/JuliaDB/ODBC.jl) succeeded, so I'm not
> sure why the problem is showing (also the previous error looks like a
> problem with the configuration of the build machine rather than a problem
> with the package).
>
> >> No joy with the alternate Postgresl package;
> https://github.com/NCarson/Postgres.jl/issues/3 has the details.
>
> >> So I guess I'll give ODBC a whirl.  Thanks  for your help.
>

Reply via email to