Reported: a compile against an installed tree dies with
Error: can't open DLL /opt/aubit4gl/plugins-1.8.1/libSQL_pg8.so - STOP
Error msg: ... cannot open shared object file: No such file or directory
Reproduced in a container on AlmaLinux 8 with postgresql-devel: the
plug-in builds, and then is not installed. lib/libsql/postgresql builds
both libSQL_pg and libSQL_pg8, but only SQL_pg was in ALL_PLUGINS,
which is what drives the install. So libSQL_pg8.so sat in the source
tree and never reached the install, and a program that asked for it got
the error above from an otherwise complete installation.
The default was wrong as well, and more seriously.
libSQL_pg and libSQL_pg8 are not two versions of the same driver.
libSQL_pg is built from simple.c - "This simple PG plug-in with limited
functionality", as its own Makefile comment says - and it has no
cursor, scroll or transaction support at all: 22 entry points against
pg8.c's 78, and not one mention of CURSOR, SCROLL or COMMIT in 1074
lines. A 4GL program that does a FOREACH or a BEGIN WORK cannot run on
it. libSQL_pg8 is the real driver, at 4616 lines.
configure was defaulting A4GL_SQLTYPE to pg, so a PostgreSQL user got
the limited driver by default and could not select the other one,
because it was not installed.
Now: both are installed, both are listed in A4GL_SQLTYPE_DETECTED, and
the default is pg8. Both still sort below Informix, so a box with both
still picks esql as it did.
Verified on Alma 8: configure reports "SQL backend: pg8", make install
puts libSQL_pg.so and libSQL_pg8.so in the plug-in directory, and the
installed aubitrc carries A4GL_SQLTYPE=pg8 with
A4GL_SQLTYPE_DETECTED="nosql pg pg8".