August 1993:

+From         : mellon@ncd.com (Ted Lemon)
+Organization : Network Computing Devices

About a year and a half ago, I hacked together an interface between Perl
and Ingres/SQL.   Recently, Buzz Moschetti and a few others got together to
try to form a standard interface between Perl and SQL, and in the process,
they posted a summary of existing work to the net, particularly to
comp.lang.perl and comp.databases.

I've received about a billion requests (well, five anyway) for copies of
the source code to this creation, and I'm getting tired of sending out
individual mail messages with the shar file.   Therefore, I've decided to
repost the original source distribution in anticipation of any further
demand.   Apologies to those who don't use SQL or use some other dialect,
or could otherwise care less.

BTW, bear in mind that a standard is being worked on.   I can personally
guarantee you that this code will not work with the standard interface.
If you care about that, wait for the standard.   I don't promise that it'll
be out anytime soon or anything, but I'm giving you advance warning so that
I won't get flamed later when somebody has twenty thousand lines of source
code written to the wrong interface.

Bye the way, there's no documentation - just some example code.   The example
doesn't do any writes to the database, and I've had at least one question
about that.   There is no restriction on doing writes to the database - both
the update and the insert commands can be used in the same way that the
select command is used in the example.  In fact, pretty much the only commands
that I don't believe work are those which are used for dynamic SQL - since
I'm using dynamic SQL to implement the interface, using it yourself would be
bogus.   If your program modifies the database, be sure to do a ``commit work''
from time to time when appropriate - this is not done automatically.

The original message is shown below:

From: Ted Lemon <mellon@pa.dec.com>
Subject: Re: Ingres in perl. [sources]

Here's the latest.   Unfortunately, now that there's also an
implementation for Oracle, the evil question of standards looms.   It
may be worthwhile at some point to create a standard sql interface
that works for both DBMSs, as well as for, e.g., Sybase, which is what
I'd be using if Ingres wasn't free with Ultrix.

To build this, just unload the shar file in your perl source
directory, cd to ingres/, and hack the Makefile.   You'll need to
change SRC to the path of your perl source pool (not the ingres
subdirectory), LIBS to point at libingres.a (its current value should
be right for a stock 6.3 installation) and change SQLPERL to the name
of the executable you want to produce.   Then do a make, and you
should have a perl with the ability to talk to an ingres database.

The file ``sqltest'' contains a brief sample of how to talk to the
database.   Unfortunately, I haven't yet written any actual
documentation - if it's unclear what to do, I may be able to answer
your questions, but please check your work carefully before asking me
for help - I'm pretty overloaded these days.

                               _MelloN_

