From: Stefan Lang Date: 2008-04-17T07:48:24+09:00 Subject: Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? 2008/4/16, Christopher Dicely : > On Wed, Apr 16, 2008 at 7:39 AM, Phillip Gawlowski > wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Thomas Kellerer wrote: > > > > | The Postgres JDBC driver is 100% Java and definitely does not rely on > > | any external DLLs or libraries, it speaks the native PG protocol (AFAIK > > | there is no such thing as a "Java interface"). So why shouldn't this be > > | possible with Ruby as well? > > > > Because Ruby doesn't really compare to Java in terms of infrastructure > > and APIs? > > > While this may be true in some general sense, I don't think its really all that > relevant here. PostgreSQL's protocol is documented and supported over > TCP/IP, and Ruby certainly has TCP/IP support, so there is no reason you > couldn't write a pure Ruby PostgreSQL driver. Yes, and to prove you right, someone has already done it. There's the postgres-pr gem on RubyForge: http://rubyforge.org/projects/ruby-dbi/ We use it for a Rails app and it works fine on MRI and JRuby. Although I can't say how it compares performance wise, this app has only a couple of users.