gqlplus is a wrapper for Oracle’s sqlplus which provides table name tab-completion and a shell history.
Update 2007-01-18: gqlplus 1.12, released on 2006-12-02, includes the following changes and compiles easily.
To make it work on OS X (using the Oracle Instant Client) I had to patch gqlplus.c
to pass through the environment variables DYLD_LIBRARY_PATH
and ORACLE_PATH
.
$ patch <<END
--- gqlplus.c.orig 2006-09-19 14:40:12.000000000 -0600
+++ gqlplus.c 2006-10-02 16:47:00.000000000 -0600
@@ -383,6 +383,8 @@
#define NLS_COMP "NLS_COMP"
#define NLS_SORT "NLS_SORT"
#define LD_LIBRARY_PATH "LD_LIBRARY_PATH"
+#define DYLD_LIBRARY_PATH "DYLD_LIBRARY_PATH"
+#define ORACLE_PATH "ORACLE_PATH"
#define PATH "PATH"
#define TERM "TERM"
#define SPACETAB " \t"
@@ -1183,6 +1185,8 @@
enx[idx++] = get_env(NLS_SORT);
enx[idx++] = get_env(LD_LIBRARY_PATH);
enx[idx++] = get_env(TWO_TASK);
+ enx[idx++] = get_env(DYLD_LIBRARY_PATH);
+ enx[idx++] = get_env(ORACLE_PATH);
return enx;
}
END
gqlplus includes its own copy of readline, which by default tries to build a shared library of itself. That failed miserably, so I turned it off. The easiest way is to pass --disable-shared
to the gqlplus configure
script, which will pass it on to readline’s configure
.
$ ./configure --disabled-shared
$ make
gqlplus
should now work just like sqlplus
for connecting to a database.