PostgreSql Libs not ready yet ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

PostgreSql Libs not ready yet ?

Post by salamandra »

Hello everybody,
I would like to know if there is ( or anybody have ) a really working sample of PostgreSql.
I tried to compile the PosgrSql_1 sample from HMG 3.4.4. and got some errors that I Can´t solve because there are some functions that does not exists in Libhmg nor Libhmgpgsql.


postgresql_error.JPG
postgresql_error.JPG (220.48 KiB) Viewed 3636 times


Best regards,


Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: PostgreSql Libs not ready yet ?

Post by AUGE_OHR »

hi,

as i can say HMG Sample is incomplet
here missing PgRDD.PRG
PGRDD.ZIP
(3.49 KiB) Downloaded 197 times
add PgRDD.PRG to demo.hbp
add : libs=hbpgsql.hbc

now when start it need LibPQ.DLL > v7.x and some other DLL here from v8.x
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
msvcr71.dll
ssleay32.dll
! Note : that is for 32 Bit OS

for 64 Bit Apps we need new LIBs ...
have fun
Jimmy
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: PostgreSql Libs not ready yet ?

Post by salamandra »

Hi Jimmy,
AUGE_OHR wrote: Wed Jul 15, 2020 5:32 am hi,

as i can say HMG Sample is incomplet
here missing PgRDD.PRG
PGRDD.ZIP

add PgRDD.PRG to demo.hbp
add : libs=hbpgsql.hbc

now when start it need LibPQ.DLL > v7.x and some other DLL here from v8.x
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
msvcr71.dll
ssleay32.dll
! Note : that is for 32 Bit OS

for 64 Bit Apps we need new LIBs ...

Thank you very much for your help. PGRDD.prg it´s already missing.
I´d put ít in the PostgrSql´s sample folder and recompile. And... more errors.
Also needded to add libhbpgsql.a and libhbpgsql_dll.a, recompile and.... more errors....

00.JPG
00.JPG (19.21 KiB) Viewed 3548 times
and after add...
01.JPG
01.JPG (19.01 KiB) Viewed 3548 times

It seems the endless story...

Did you try the HMG extended sample ? It compiles without any error but does not run because of libpq.dll (I don´t know wich is the right version).

I´ll try again in a few days.




Best regards,


Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: PostgreSql Libs not ready yet ?

Post by AUGE_OHR »

hi,

i have build Demo.EXE as i show above.
libpq.dll and other DLL are from PostgreSQL v8.x. i will try v9.5x

Demo.EXE start and create Table but i have Problem to use "PGRDD" to "open" it ... hm ... :(
i have to look into PgRDD.PRG what it is doing.

---

using SQL the Problem is "missing ISAM" so you can´t "navigate" like in DBF
Alaska have a PG-ISAM "Emulation" but it have a lot of overhead and is slow.
the Idea is to use old Code (fo DBF) and "just" change DBE (RDD) to use PostgreSQL

Question : how does harbour work with SQL ? does MySQL / MariaDB "Wrapper" have some "ISAM-Emulation" :idea:
have fun
Jimmy
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: PostgreSql Libs not ready yet ?

Post by salamandra »

Hi Jimmy,
AUGE_OHR wrote: Wed Jul 15, 2020 9:58 pm hi,

i have build Demo.EXE as i show above.
libpq.dll and other DLL are from PostgreSQL v8.x. i will try v9.5x

Demo.EXE start and create Table but i have Problem to use "PGRDD" to "open" it ... hm ... :(
i have to look into PgRDD.PRG what it is doing.

---

using SQL the Problem is "missing ISAM" so you can´t "navigate" like in DBF
Alaska have a PG-ISAM "Emulation" but it have a lot of overhead and is slow.
the Idea is to use old Code (fo DBF) and "just" change DBE (RDD) to use PostgreSQL

Question : how does harbour work with SQL ? does MySQL / MariaDB "Wrapper" have some "ISAM-Emulation" :idea:
Well, finally I got to compile without errors the demo program using all DLLs from Postgre Sql v8.
It compiled without errors, but does not open the main window, does not connect to database neither shows any error messages.
( I´ve tested the database engine and works properly ).
I think PostgreSql it´s not ready to use at this moment (at minimum level) and it´s not worth to continue spending time (mine), there are too many other flavors of SQL to choose.
Thank you for your help.

Best regards,

Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: PostgreSql Libs not ready yet ?

Post by AUGE_OHR »

hi,

i "think" COLUMNCONTROLS() are not need but COLUMNFIELDS() are missing in Demo.PRG
COLUMNFIELDS { 'cCode' , 'Name' , 'Salary' , 'Creation' , 'Description' }
! Note : have rename "code" to "cCode"

now it got GRID ... but it is empty :o
when look in Debugger it have open Workarea
PqDemo_Error5.JPG
PqDemo_Error5.JPG (54.47 KiB) Viewed 3527 times
so what do i miss :idea:
please help

p.s. have also try BROWSE but same empty
have fun
Jimmy
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: PostgreSql Libs not ready yet ?

Post by salamandra »

Hi Jimmy,
As I said, I got compile but exe crashes just after try to connect to server.
I used DLLs from version 8.3 and run Server version 9.4 (version 8.3 installs but does not run)
What DLLs version have you used to compile ? and what server version are you running?
I think I´ll do a new test in the next week with a brand new demo prg


best regards,

Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: PostgreSql Libs not ready yet ?

Post by edk »

AUGE_OHR wrote: Thu Jul 16, 2020 1:49 am hi,

i "think" COLUMNCONTROLS() are not need but COLUMNFIELDS() are missing in Demo.PRG
COLUMNFIELDS { 'cCode' , 'Name' , 'Salary' , 'Creation' , 'Description' }
! Note : have rename "code" to "cCode"

now it got GRID ... but it is empty :o
when look in Debugger it have open Workarea
PqDemo_Error5.JPG
so what do i miss :idea:
please help

p.s. have also try BROWSE but same empty
Note the type of fields, they are all "U". This is probably the reason why the data is not shown in Grid and Browse.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: PostgreSql Libs not ready yet ?

Post by AUGE_OHR »

hi,

have found PgRDD.PRG in old harbour Version. like SQLMIX it use USRRDD code.
but under harbour v3.x there is no Sample any more so i´m not sure if PgRDD.PRG is still valid :?:

---

have test this

Code: Select all

  FOR EACH aFieldStruct IN aStruct

       aField := ARRAY( UR_FI_SIZE )
       aField[ UR_FI_NAME ]    := aFieldStruct[ DBS_NAME ]
       IF VALTYPE(aFieldStruct[ DBS_TYPE ]) = "U"
         aField[ UR_FI_TYPE ]  := "C"
       ELSE
         aField[ UR_FI_TYPE ]  := aFieldStruct[ DBS_TYPE ]
       ENDIF
but aFieldStruct[ DBS_TYPE ] is valid

i guess "PGRDD" does not work as expect ...

---

how does USRRDD work ... any Information about it :idea:
have fun
Jimmy
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: PostgreSql Libs not ready yet ?

Post by jairpinho »

salamandra wrote: Tue Jul 14, 2020 11:42 pm Hello everybody,
I would like to know if there is ( or anybody have ) a really working sample of PostgreSql.
I tried to compile the PosgrSql_1 sample from HMG 3.4.4. and got some errors that I Can´t solve because there are some functions that does not exists in Libhmg nor Libhmgpgsql.



postgresql_error.JPG



Best regards,


Salamandra, Brazil
ola segue um exemplo funcional testado com versão postgresql-9.1.1-1-windows, instalar e colocar a senha 123456

English:

hello follows a functional example tested with postgresql-9.1.1-1-windows version, install and set password 123456
Attachments
POSTGRESQL.1A.zip
(3.24 MiB) Downloaded 197 times
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
Post Reply