Postgresql

Sergio Szychowski <[email protected]> Sun, 9 Aug 2020 18:31:36 -0300
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAHrRhuhfAtZALecwiM50nt9Sne0RccxYJheq=xeRSTwH-uNv8Q@mail.gmail.com>
Hello,
I am trying to connect aubit4gl (1.5.2) with postgresql,
(see 9.4), a simple example how to connect to the base, works fine.
But this code returns an error,
------
database novatecnologias
main
define waret record like ntcpte.*
display "I'm connected"
declare curcli cursor for select * from ntcpte
foreach curcli into waret.*
  display waret.nucomprob_i
end foreach
end main
-------
./test0
I'm connected
Error:Could not find function in shared library
(A4GLSQLLIB_A4GLSQL_set_sqlca_sqlcode)- STOP
---------

The adbschema tool also fails.
$ adbschema -d novatecnologias
ADBSCHEMA (c) 2005-2007 Aubit Computing Ltd
Error:Could not find function in shared library
(A4GLSQLLIB_A4GLSQL_declare_cursor_internal)- STOP

-------

Environment variables:

export AUBITDIR=/usr/local/aubit4gl-1.5.2pgsql/aubit4glsrc
export PATH=$PATH:${AUBITDIR}/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$AUBITDIR/lib

# FOR AUBIT4GL
export AUBITDIR_SRC=$AUBITDIR
export A4GL_INIFILE=$AUBITDIR/etc/aubitrc
export AWK=gawk
export DBSCREENOUT=/tmp/${USER}.out
export A4GL_PRINTSCRKEY=CONTROL-P
export A4GL_PRINTSCRFILE=+$DBSCREENOUT
export ODDOPTIONS=N
export FORCE_CLOSE=Y
export BINDDBDATE=Y
export CACHESCHEMA=Y
export DATE_AS_CHAR=Y
export NO_UPDATE_TABLE=Y
export FIXUPDATE=Y
export DBDATE=DMY4/
export NODATETIMES=Y
export A4GL_ALLOWCOMMAINDECIMAL=N
export LOGODBCSQL=N
export A4GL_NUMERIC=.
export DATE_AS_ISO_DATE_STRING=Y
export USEREALTABLEFORREP=Y
export LOGPROXY=Y

#####################
#Normally - you should have one definition within a GLOBALS .. END GLOBALS
#and then you reference that definition from a GLOBALS "filename.4gl"
#In Aubit4gl - we try to initialise globals (in informix4GL - c-compiler
version - they are not initialised) -
#but if its defined in two files - it will get initialised in both (when
any function in that module is called).
#If you've got it in two files, and you can't "fix" it - try compiling with
#####################

export NOGLOBALINIT=Y
#####################
# FOR postgresql
export PGHOST=10.1.2.5
export PGDATABASE=novatecnologias
export PGUSER=myuser
export PGPASSWORD=mypassword
export PATH=$PATH:/usr/local/PostgreSQL/9.4/bin
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/PostgreSQL/9.4/lib:/usr/local/PostgreSQL/9.4/lib/postgresql

export A4GL_SQLTYPE=pg
export A4GL_LEXTYPE=EC
export A4GL_LEXDIALECT=POSTGRES
# All updates will be transformed to Ansi syntax
export A4GL_FIXUPDATE=Y
# The keyword 'AS' is included when using an alias on a select column
export A4GL_USE_ALIAS_AS=Y
# Any CREATE TEMP TABLE .. WITH NO LOG will have the 'WITH NO LOG' silently
removed
export A4GL_OMIT_NO_LOG=Y
# No indicator variables
export A4GL_USE_INDICATOR=N
# When needed use the ecpg UNLOAD statement rather
# than the aubit code
export A4GL_ESQL_UNLOAD=Y

export A4GL_SQLUID=myuser
export A4GL_SQLPWD=mypassword
export SQLUID=myuser
export SQLPWD=mypassword

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss