# Is there a One True Postgres interface? Is Ruby-postgres maintained?

**URL:** <https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880>\
**Category:** ruby-talk\
**Created:** [14 April 2008 22:24 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880 "2008-04-14T22:24:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [14 April 2008 22:24 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/1 "2008-04-14T22:24:22Z")

</div>

Is there a One true Ruby Interface to Postgres?

All websites I have found so far have "Last Updated" timestamps of  
several years ago.

Is ruby-postgres still being maintained?

Running with warnings on,  
&nbsp;&nbsp;&nbsp;require 'postgres'  
emits this warning...

/opt/ruby/ruby-1.8.6-p114/lib/ruby/1.8/i686-linux/bigdecimal.so: warning: discarding old open

Looking in the postgres.c file I see...

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "connect", "new");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "open", "connect");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "setdb", "connect");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "setdblogin", "connect");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "open", "connect");

Deleting the second "open", "connect" gets rid of the warning.

Here's the patch

diff -u postgres.c~ postgres.c  
--- postgres.c~ 2005-12-22 04:59:43.000000000 +1300  
+++ postgres.c 2008-04-15 10:11:26.000000000 +1200  
@@ -2510,7 +2510,6 @@  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "open", "connect");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "setdb", "connect");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "setdblogin", "connect");  
- rb\_define\_singleton\_alias(rb\_cPGconn, "open", "connect");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_method(rb\_cPGconn, "escape", pgconn\_s\_escape, 1);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_method(rb\_cPGconn, "quote", pgconn\_s\_quote, 1);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rb\_define\_singleton\_alias(rb\_cPGconn, "format", "quote");

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : [john.carter@tait.co.nz](mailto:john.carter@tait.co.nz)  
New Zealand

---

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [14 April 2008 22:28 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/2 "2008-04-14T22:28:47Z")

</div>

Sorry, some version details on that post...

This is against the snapshot version  
&nbsp;&nbsp;&nbsp;&nbsp;ruby-postgres-20051221.tar.gz

from  
&nbsp;&nbsp;&nbsp;[http://ruby.scripting.ca/postgres/](http://ruby.scripting.ca/postgres/)

The fault is not in the release version.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ruby-postgres-0.7.1.tar.gz

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : john.carter@tait.co.nz  
New Zealand

> **···**
>
> On Tue, 15 Apr 2008, John Carter wrote:
> 
> > Is ruby-postgres still being maintained?
> > 
> > Running with warnings on,  
> > require 'postgres'  
> > emits this warning...
> > 
> > /opt/ruby/ruby-1.8.6-p114/lib/ruby/1.8/i686-linux/bigdecimal.so: warning: discarding old open

---

<div class="post-metadata">

**Author:** ![Reid\_Thompson1](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@Reid\_Thompson1](https://rubytalk.org/u/Reid_Thompson1)\
**Post date:** [14 April 2008 23:11 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/3 "2008-04-14T23:11:06Z")

</div>

John Carter wrote:

> Is there a One true Ruby Interface to Postgres?
> 
> All websites I have found so far have "Last Updated" timestamps of  
> several years ago.
> 
> Is ruby-postgres still being maintained?

see ruby-pg

[http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)

---

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [14 April 2008 23:41 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/4 "2008-04-14T23:41:05Z")

</div>

Interestingly enough that link also serves up both flavors,  
ruby-postgres and ruby-pg, without comment. Is there any discussion  
anywhere on the relative merits?

Or is ruby-pg the One True flavour?

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : john.carter@tait.co.nz  
New Zealand

> **···**
>
> On Tue, 15 Apr 2008, Reid Thompson wrote:
> 
> > see ruby-pg
> > 
> > [http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)

---

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [14 April 2008 23:44 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/5 "2008-04-14T23:44:31Z")

</div>

Ok, sorry, I have now RTFRM "Read The Fine README" and see that ruby-pg is  
indeed The One True Postgres Interface and ruby-postgres is being superceded

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : john.carter@tait.co.nz  
New Zealand

> **···**
>
> On Tue, 15 Apr 2008, John Carter wrote:
> 
> > On Tue, 15 Apr 2008, Reid Thompson wrote:
> > 
> > > see ruby-pg
> > > 
> > > [http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)
> > 
> > Interestingly enough that link also serves up both flavors,  
> > ruby-postgres and ruby-pg, without comment. Is there any discussion  
> > anywhere on the relative merits?
> > 
> > Or is ruby-pg the One True flavour?

---

<div class="post-metadata">

**Author:** ![Jeff\_Davis1](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@Jeff\_Davis1](https://rubytalk.org/u/Jeff_Davis1)\
**Post date:** [15 April 2008 17:43 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/6 "2008-04-15T17:43:20Z")

</div>

> \> see ruby-pg  
> \>  
> \> [http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)
> 
> Interestingly enough that link also serves up both flavors,  
> ruby-postgres and ruby-pg, without comment. Is there any discussion  
> anywhere on the relative merits?

ruby-postgres had some serious maintenance problems, and was unable to  
even build against PostgreSQL 8.3, and my various patches were not  
applied.

So, I started maintaining a fork of ruby-postgres with my most important  
patches applied, and started a rewrite to address some of the more  
fundamental problems. The rewrite is called ruby-pg, and I consider it  
to be the best driver available, and it's intended to replace the  
others.

> Or is ruby-pg the One True flavour?

As far as I can tell, it's the only actively maintained PostgreSQL  
driver for Ruby. It's fairly new, but:  
\* it's well documented (RDoc)  
\* offers almost all the functionality available from libpq (which is a  
lot of functions)  
\* I'm responsive to bug reports  
\* I have an expanding set of rspec tests.

The biggest problem I am having with the project is making it work  
seamlessly on windows. Several people have tried to help me, but I don't  
think the problem has been solved, and I haven't received many specific  
suggestions to make it work.

If anyone wants to help me with that, please contact me.

Regards,  
&nbsp;&nbsp;Jeff Davis

> **···**
>
> On Tue, 2008-04-15 at 08:41 +0900, John Carter wrote:
> 
> > On Tue, 15 Apr 2008, Reid Thompson wrote:

---

<div class="post-metadata">

**Author:** ![Chad\_Perrin1](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Chad\_Perrin1](https://rubytalk.org/u/Chad_Perrin1)\
**Post date:** [15 April 2008 02:52 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/7 "2008-04-15T02:52:22Z")

</div>

Where'd you find that README? In the source -- or is there somewhere to  
get it without downloading?

> **···**
>
> On Tue, Apr 15, 2008 at 08:44:31AM +0900, John Carter wrote:
> 
> > Ok, sorry, I have now RTFRM "Read The Fine README" and see that ruby-pg is  
> > indeed The One True Postgres Interface and ruby-postgres is being superceded
> 
> --  
> CCD CopyWrite Chad Perrin [[http://ccd.apotheon.org](http://ccd.apotheon.org) ]  
> awj @reddit: "The terms never and always are never always true."

---

<div class="post-metadata">

**Author:** ![Chad\_Perrin1](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Chad\_Perrin1](https://rubytalk.org/u/Chad_Perrin1)\
**Post date:** [15 April 2008 22:22 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/8 "2008-04-15T22:22:53Z")

</div>

> \>  
> \> \> see ruby-pg  
> \> \>  
> \> \> [http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)  
> \>  
> \> Interestingly enough that link also serves up both flavors,  
> \> ruby-postgres and ruby-pg, without comment. Is there any discussion  
> \> anywhere on the relative merits?  
> \>
> 
> ruby-postgres had some serious maintenance problems, and was unable to  
> even build against PostgreSQL 8.3, and my various patches were not  
> applied.
> 
> So, I started maintaining a fork of ruby-postgres with my most important  
> patches applied, and started a rewrite to address some of the more  
> fundamental problems. The rewrite is called ruby-pg, and I consider it  
> to be the best driver available, and it's intended to replace the  
> others.
> 
> \> Or is ruby-pg the One True flavour?
> 
> As far as I can tell, it's the only actively maintained PostgreSQL  
> driver for Ruby. It's fairly new, but:  
> \* it's well documented (RDoc)

Is there good actual use documentation, rather than only basic class and  
method documentation?

> \* offers almost all the functionality available from libpq (which is a  
> lot of functions)  
> \* I'm responsive to bug reports  
> \* I have an expanding set of rspec tests.
> 
> The biggest problem I am having with the project is making it work  
> seamlessly on windows. Several people have tried to help me, but I don't  
> think the problem has been solved, and I haven't received many specific  
> suggestions to make it work.

That won't prevent me from using it when I start doing some serious  
PostgreSQL work with Ruby in the near future -- but I hope you get it  
working anyway, of course.

> If anyone wants to help me with that, please contact me.

I doubt I'd be much help, but if I think of anything while working with  
your module, I'll definitely let you know. There's an outside  
possibility I might have to port something to MS Windows at some point, I  
guess.

> **···**
>
> On Wed, Apr 16, 2008 at 02:43:20AM +0900, Jeff Davis wrote:
> 
> > On Tue, 2008-04-15 at 08:41 +0900, John Carter wrote:  
> > \> On Tue, 15 Apr 2008, Reid Thompson wrote:
> 
> --  
> CCD CopyWrite Chad Perrin [[http://ccd.apotheon.org](http://ccd.apotheon.org) ]  
> Isaac Asimov: "Part of the inhumanity of the computer is that, once it is  
> completely programmed and working smoothly, it is completely honest."

---

<div class="post-metadata">

**Author:** ![M\_Edward\_Ed\_Borasky1](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@M\_Edward\_Ed\_Borasky1](https://rubytalk.org/u/M_Edward_Ed_Borasky1)\
**Post date:** [15 April 2008 23:49 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/9 "2008-04-15T23:49:51Z")

</div>

Jeff Davis wrote:

> > > see ruby-pg
> > > 
> > > [http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)
> > 
> > Interestingly enough that link also serves up both flavors,  
> > ruby-postgres and ruby-pg, without comment. Is there any discussion  
> > anywhere on the relative merits?
> 
> ruby-postgres had some serious maintenance problems, and was unable to  
> even build against PostgreSQL 8.3, and my various patches were not  
> applied.
> 
> So, I started maintaining a fork of ruby-postgres with my most important  
> patches applied, and started a rewrite to address some of the more  
> fundamental problems. The rewrite is called ruby-pg, and I consider it  
> to be the best driver available, and it's intended to replace the  
> others.
> 
> > Or is ruby-pg the One True flavour?
> 
> As far as I can tell, it's the only actively maintained PostgreSQL  
> driver for Ruby. It's fairly new, but:  
> \* it's well documented (RDoc)  
> \* offers almost all the functionality available from libpq (which is a  
> lot of functions)  
> \* I'm responsive to bug reports  
> \* I have an expanding set of rspec tests.
> 
> The biggest problem I am having with the project is making it work  
> seamlessly on windows. Several people have tried to help me, but I don't  
> think the problem has been solved, and I haven't received many specific  
> suggestions to make it work.
> 
> If anyone wants to help me with that, please contact me.
> 
> Regards,  
> &nbsp;&nbsp;Jeff Davis

Nothing else works seamlessly on Windows. 🙂 But seriously, there is an add-on you can get when you install PostgreSQL 8.3 on Windows that contains an ancient implementation of Ruby and Rails -- with PostgreSQL, of course. I looked at it briefly, and I have no idea how it was talking to PostgreSQL.

At this stage of the game, I think a pure Ruby PostgreSQL (and MySQL) interface has some serious advantages over struggling with numerous C compilers for Windows, Mac, Solaris, etc.

> **···**
>
> > On Tue, 2008-04-15 at 08:41 +0900, John Carter wrote:
> > 
> > > On Tue, 15 Apr 2008, Reid Thompson wrote:

---

<div class="post-metadata">

**Author:** ![Luis\_Lavena1](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Lavena1](https://rubytalk.org/u/Luis_Lavena1)\
**Post date:** [16 April 2008 00:20 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/10 "2008-04-16T00:20:10Z")

</div>

Jeff, I managed to get do\_postgres (DataObject.rb project) working on  
Windows with PostgreSQL 8.2.

Why you don't fill a Integration Request [1] at RubyInstaller tracker  
and point with the instructions to get the code, the dependencies and  
everything.

I'll be happy to provide patches to make it work properly under  
Windows (both VC6 and MinGW). See my post on PostgreSQL [2]

[1] [http://rubyforge.org/tracker/?atid=22895&group\_id=167&func=browse](http://rubyforge.org/tracker/?atid=22895&group_id=167&func=browse)  
[2] [http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000284.html](http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000284.html)

Take care,

> **···**
>
> On Apr 15, 2:43 pm, Jeff Davis \<r...@j-davis.com\> wrote:
> 
> > On Tue, 2008-04-15 at 08:41 +0900, John Carter wrote:  
> > \> On Tue, 15 Apr 2008, Reid Thompson wrote:
> > 
> > \> \> see ruby-pg
> > 
> > \> \>[http://rubyforge.org/projects/ruby-pg/](http://rubyforge.org/projects/ruby-pg/)
> > 
> > \> Interestingly enough that link also serves up both flavors,  
> > \> ruby-postgres and ruby-pg, without comment. Is there any discussion  
> > \> anywhere on the relative merits?
> > 
> > ruby-postgres had some serious maintenance problems, and was unable to  
> > even build against PostgreSQL 8.3, and my various patches were not  
> > applied.
> > 
> > So, I started maintaining a fork of ruby-postgres with my most important  
> > patches applied, and started a rewrite to address some of the more  
> > fundamental problems. The rewrite is called ruby-pg, and I consider it  
> > to be the best driver available, and it's intended to replace the  
> > others.
> > 
> > \> Or is ruby-pg the One True flavour?
> > 
> > As far as I can tell, it's the only actively maintained PostgreSQL  
> > driver for Ruby. It's fairly new, but:  
> > \* it's well documented (RDoc)  
> > \* offers almost all the functionality available from libpq (which is a  
> > lot of functions)  
> > \* I'm responsive to bug reports  
> > \* I have an expanding set of rspec tests.
> > 
> > The biggest problem I am having with the project is making it work  
> > seamlessly on windows. Several people have tried to help me, but I don't  
> > think the problem has been solved, and I haven't received many specific  
> > suggestions to make it work.
> > 
> > If anyone wants to help me with that, please contact me.
> 
> --  
> Luis Lavena

---

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [15 April 2008 04:40 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/11 "2008-04-15T04:40:57Z")

</div>

In the basement, in the locked cupboard, the one with the sign "Beware  
of the Leopard".... :-)) (As you can tell, I'm a Douglas Adams fan...)

It's inside the ruby-pg source bundle.

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : john.carter@tait.co.nz  
New Zealand

> **···**
>
> On Tue, 15 Apr 2008, Chad Perrin wrote:
> 
> > On Tue, Apr 15, 2008 at 08:44:31AM +0900, John Carter wrote:
> > 
> > > Ok, sorry, I have now RTFRM "Read The Fine README" and see that ruby-pg is  
> > > indeed The One True Postgres Interface and ruby-postgres is being superceded
> > 
> > Where'd you find that README? In the source -- or is there somewhere to  
> > get it without downloading?

---

<div class="post-metadata">

**Author:** ![Phil](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@Phil](https://rubytalk.org/u/Phil)\
**Post date:** [16 April 2008 00:08 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/12 "2008-04-16T00:08:20Z")

</div>

M. Edward (Ed) Borasky wrote:

> At this stage of the game, I think a pure Ruby PostgreSQL (and MySQL)  
> interface has some serious advantages over struggling with numerous C  
> compilers for Windows, Mac, Solaris, etc.

No kidding. Looking at the ruby-installer ML, most of the difficulties  
are with Ruby's \*external\* dependencies (readlines in particular).

And these issues cascade, for example, into PostgreSQL (some OpenSSL  
dependency weirdness, I take it from Luis) in conjunction with Ruby.

Unfortunately, I don't know how one should implement pure Ruby  
implementations since PostgreSQL and others would need to provide a Ruby  
interface (at least, as far as I can see). Ah, the joy of interop..

On one level it sounds fun, on the actual implementation levels, I'm  
getting greys hairs just looking at the matter.

Sadly, when it comes to C, I'm an end-user of provided binaries, as C  
makes my head hurt just by reading C, so I can't be of much help to  
Luis' efforts. ☹

I have to get some C skills under my belt, methinks.

However, the OCI is making progress in switching away from VC6.0, though  
progress is slow.

- --  
Phillip Gawlowski  
Twitter: twitter.com/cynicalryan

~ - You know you've been hacking too long when...  
...your friends who aren't hackers wonder what happened to you.

---

<div class="post-metadata">

**Author:** ![Tom\_Copeland](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@Tom\_Copeland](https://rubytalk.org/u/Tom_Copeland)\
**Post date:** [16 April 2008 10:15 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/13 "2008-04-16T10:15:28Z")

</div>

This may have already been mentioned, but there's postgres-pr:

> **···**
>
> On Wed, 2008-04-16 at 08:49 +0900, M. Edward (Ed) Borasky wrote:
> 
> > At this stage of the game, I think a pure Ruby PostgreSQL (and MySQL)  
> > interface has some serious advantages over struggling with numerous C  
> > compilers for Windows, Mac, Solaris, etc.
> 
> ======================  
> $ gem list -d --remote postgres-pr
> 
> \*\*\* REMOTE GEMS \*\*\*
> 
> # postgres-pr (0.4.0) &nbsp;&nbsp;&nbsp;&nbsp;A pure Ruby interface to the PostgreSQL (&gt;= 7.4) database
> 
> Yours,
> 
> tom

---

<div class="post-metadata">

**Author:** ![Jeff\_Davis1](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@Jeff\_Davis1](https://rubytalk.org/u/Jeff_Davis1)\
**Post date:** [16 April 2008 17:38 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/14 "2008-04-16T17:38:37Z")

</div>

Thank you for the response!

I have filed an integration request, please let me know if more  
information is required.

I would welcome any patches that improve portability to any platform.

Regards,  
&nbsp;&nbsp;Jeff Davis

> **···**
>
> On Wed, 2008-04-16 at 09:20 +0900, Luis Lavena wrote:
> 
> > Jeff, I managed to get do\_postgres (DataObject.rb project) working on  
> > Windows with PostgreSQL 8.2.
> > 
> > Why you don't fill a Integration Request [1] at RubyInstaller tracker  
> > and point with the instructions to get the code, the dependencies and  
> > everything.
> > 
> > I'll be happy to provide patches to make it work properly under  
> > Windows (both VC6 and MinGW). See my post on PostgreSQL [2]
> > 
> > [1] [http://rubyforge.org/tracker/?atid=22895&group\_id=167&func=browse](http://rubyforge.org/tracker/?atid=22895&group_id=167&func=browse)  
> > [2] [http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000284.html](http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000284.html)

---

<div class="post-metadata">

**Author:** ![Jeff\_Davis1](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@Jeff\_Davis1](https://rubytalk.org/u/Jeff_Davis1)\
**Post date:** [16 April 2008 18:08 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/15 "2008-04-16T18:08:39Z")

</div>

> Nothing else works seamlessly on Windows. 🙂 But seriously, there is an  
> add-on you can get when you install PostgreSQL 8.3 on Windows that  
> contains an ancient implementation of Ruby and Rails -- with PostgreSQL,  
> of course. I looked at it briefly, and I have no idea how it was talking  
> to PostgreSQL.

Interesting.

> At this stage of the game, I think a pure Ruby PostgreSQL (and MySQL)  
> interface has some serious advantages over struggling with numerous C  
> compilers for Windows, Mac, Solaris, etc.

In my experience with ruby-pg, there were only minor issues with  
platforms other than windows. I solved all the problems that I know  
about on OS X, linux, solaris, and freebsd. It probably works on some  
other platforms as well. Windows is the only difficult case, as far as I  
can tell.

Trying to maintain all the code to implement the PostgreSQL protocol  
would be a huge project, and not one that I have the time for.  
Furthermore, people need to trust their database driver, and I can  
provide a certain level of that trust by using the well-tested libpq  
rather than trying to implement it myself.

Regards,  
&nbsp;&nbsp;Jeff Davis

> **···**
>
> On Wed, 2008-04-16 at 08:49 +0900, M. Edward (Ed) Borasky wrote:

---

<div class="post-metadata">

**Author:** ![Jeff\_Davis1](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@Jeff\_Davis1](https://rubytalk.org/u/Jeff_Davis1)\
**Post date:** [16 April 2008 18:44 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/16 "2008-04-16T18:44:40Z")

</div>

I consider the class and method documentation to be quite complete and  
useful. Most users can browse that to find the functionality they are  
looking for.

There could be some better tutorial documentation, but I haven't gotten  
around to that yet.

Regards,  
&nbsp;&nbsp;Jeff Davis

> **···**
>
> On Wed, 2008-04-16 at 07:22 +0900, Chad Perrin wrote:
> 
> > \> As far as I can tell, it's the only actively maintained PostgreSQL  
> > \> driver for Ruby. It's fairly new, but:  
> > \> \* it's well documented (RDoc)
> > 
> > Is there good actual use documentation, rather than only basic class and  
> > method documentation?

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [15 April 2008 04:52 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/17 "2008-04-15T04:52:47Z")

</div>

John Carter wrote:

> In the basement, in the locked cupboard, the one with the sign "Beware  
> of the Leopard".... :-)) (As you can tell, I'm a Douglas Adams fan...)

Funny. I always figured you as an Edgar Rice Burroughs fan. 😉

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![Chad\_Perrin1](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Chad\_Perrin1](https://rubytalk.org/u/Chad_Perrin1)\
**Post date:** [15 April 2008 06:57 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/18 "2008-04-15T06:57:23Z")

</div>

It seems kind of suboptimal, to me, to only let someone know that  
postgres has been superseded by pg \*after\* something has already been  
downloaded and unpacked.

> **···**
>
> On Tue, Apr 15, 2008 at 01:40:57PM +0900, John Carter wrote:
> 
> > On Tue, 15 Apr 2008, Chad Perrin wrote:
> > 
> > \>On Tue, Apr 15, 2008 at 08:44:31AM +0900, John Carter wrote:  
> > \>\>  
> > \>\>Ok, sorry, I have now RTFRM "Read The Fine README" and see that ruby-pg is  
> > \>\>indeed The One True Postgres Interface and ruby-postgres is being  
> > \>\>superceded  
> > \>  
> > \>Where'd you find that README? In the source -- or is there somewhere to  
> > \>get it without downloading?
> > 
> > In the basement, in the locked cupboard, the one with the sign "Beware  
> > of the Leopard".... :-)) (As you can tell, I'm a Douglas Adams fan...)
> > 
> > It's inside the ruby-pg source bundle.
> 
> --  
> CCD CopyWrite Chad Perrin [[http://ccd.apotheon.org](http://ccd.apotheon.org) ]  
> Baltasar Gracian: "A wise man gets more from his enemies than a fool from  
> his friends."

---

<div class="post-metadata">

**Author:** ![Luis\_Lavena1](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Lavena1](https://rubytalk.org/u/Luis_Lavena1)\
**Post date:** [16 April 2008 00:25 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/19 "2008-04-16T00:25:03Z")

</div>

> -----BEGIN PGP SIGNED MESSAGE-----  
> Hash: SHA1
> 
> M. Edward (Ed) Borasky wrote:
> 
> \>  
> \> At this stage of the game, I think a pure Ruby PostgreSQL (and MySQL)  
> \> interface has some serious advantages over struggling with numerous C  
> \> compilers for Windows, Mac, Solaris, etc.
> 
> No kidding. Looking at the ruby-installer ML, most of the difficulties  
> are with Ruby's \*external\* dependencies (readlines in particular).
> 
> And these issues cascade, for example, into PostgreSQL (some OpenSSL  
> dependency weirdness, I take it from Luis) in conjunction with Ruby.
> 
> Unfortunately, I don't know how one should implement pure Ruby  
> implementations since PostgreSQL and others would need to provide a Ruby  
> interface (at least, as far as I can see). Ah, the joy of interop..

A pure ruby implementation involves:

Usage of Ruby/DL, which is a bridge between C API from DLL and Ruby  
and lot of understanding of the internals of the adapter API.

Last time I used Ruby/DL was a nightmare since sometimes what  
developers states they export quite differ from reality, so you ended  
diggin into the utility source code to catch the expected result in  
your side.

Lot of works, and still will be slower than a C ruby extension acting  
as bridge between the DLL and your Ruby code.

> Sadly, when it comes to C, I'm an end-user of provided binaries, as C  
> makes my head hurt just by reading C, so I can't be of much help to  
> Luis' efforts. ☹

Don't worry, I take a lot of painkillers after staring a C function  
for a long period of time...

> I have to get some C skills under my belt, methinks.
> 
> However, the OCI is making progress in switching away from VC6.0, though  
> progress is slow.

I commented to Jeff he should ask for a Integration requrest and I can  
help him get the adapter working on both implementations for the time  
being.

Anyway, I'll love to know if Ruby on Rails will support this adapter  
or not, since all the work will be useless if all the Railers came and  
yell about their PostgreSQL database don't work for them 😛

Regards,

> **···**
>
> On Apr 15, 9:08 pm, Phillip Gawlowski \<cmdjackr...@googlemail.com\> wrote:  
> --  
> Luis Lavena

---

<div class="post-metadata">

**Author:** ![Thomas\_Kellerer](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@Thomas\_Kellerer](https://rubytalk.org/u/Thomas_Kellerer)\
**Post date:** [16 April 2008 14:15 UTC](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880/20 "2008-04-16T14:15:09Z")

</div>

Phillip Gawlowski, 16.04.2008 02:08:

> Unfortunately, I don't know how one should implement pure Ruby  
> implementations since PostgreSQL and others would need to provide a Ruby  
> interface (at least, as far as I can see).

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?

Thomas

[Next page](https://rubytalk.org/t/is-there-a-one-true-postgres-interface-is-ruby-postgres-maintained/45880.md?page=2)
