Who is using PostGreSQL?

Xbase++ 2.0 Build 554 or later
Message
Author
User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Who is using PostGreSQL?

#11 Post by Tom »

It isn't a problem to use both DBE's at the same time?
No. You may, for instance, set the PG-session as the default session, so any table opened comes for the PG, and use any DBF directly with the VIA clause. And you may use SQL to deal with the data of this file, if you want.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Who is using PostGreSQL?

#12 Post by Tom »

OrdlistAdd( <tablename> ) does the trick.
If the base was DBFCDX. If the base was DBFNTX, the solution is a little more complicated. ;)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Who is using PostGreSQL?

#13 Post by rdonnay »

If the base was DBFCDX. If the base was DBFNTX, the solution is a little more complicated. ;)
Actually, the base is ADS, FoxPro 2.6 compatible, using CDX indexes.

This is a very good way to start the new year.
I have something to do now that will occupy my grey-matter.

Unfortunately, the dog isn't happy about this.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Who is using PostGreSQL?

#14 Post by Auge_Ohr »

hi,

up to v9.5 there was a 32 Bit and 64 Bit Version of PostgreSQL and PgAdmin3

you can still use LibPQ.DLL from "Original" of Phil Ide ZIP File with PostgreSQL v12 Server
have a look "what" LibPQ.DLL is doing ... "send" SQL-Statement / Query and receive Result-Set

PgAdmin4 is since v10 which is 64 Bit only and LibPQ.DLL (and Source) is also 64 Bit
as Xbase++ is 32 Bit you can not use any of those 64 Bit *.DLL (or it´s Source)

---

when use SQL you do not need ISAM ... it is like Hybrid Mode of Xbase++

it is made for People who do not want to learn SQL

they will be happy when Hybrid-App work under 64 Bit Environment
... but after some Time they want FULL-GUI and Hybrid was waste of Time

PgDBE does "translate" xBase Command into "SELECT ..." Statement
that work fine but it will not "optimize" your Code

but how can you "optimize" your Code when not know how SQL work :?:

---

based on Phil Ide Code from 2003 you can use LibPQ.DLL and send SQL Statment / Query and get Result-Set
Phil also wrote "myPGSQLBrowse" which can be used to "navigate" in Result-Set.

when have Xbase++ v2.x i recommend "Pass-Through" Mode

that´s all what you need ... but you have to learn how SQL work and than "think SQL"
xbpgsql.zip
Code from Phil Ide 2003 for Xbase++
(38.57 KiB) Downloaded 226 times
greetings by OHR
Jimmy

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Who is using PostGreSQL?

#15 Post by Tom »

Jimmy,
it is made for People who do not want to learn SQL
:evil:

No.

It is made for real world companies that want to save the investments they made over the decades and migrate tons and tons of code into something that works with a state of the art database server. You don't have any experiences with PGDBE, you are just talking about the same bullshit again and again. Go ahead and work with whatever you want, but we are talking about living, big applications. The PGDBE is an excellent solution to go forward very fast. And, no, it does not translate every navigational command into an SQL statement. It doesn't work that way. You're wrong.

But it works. I can show you big applications that do work that way, and it took less than 0.001 percent of the work which would have been needed to transfer those apps to native SQL.

I don't know what kind of customers you have, but most of the guys here have big vertical business solutions. These applications deal with hundreds of tables, and some of them are based on code back from the late eighties. We are talking about time running out.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Who is using PostGreSQL?

#16 Post by Auge_Ohr »

Tom wrote: Wed Jan 19, 2022 8:50 am
it is made for People who do not want to learn SQL
:evil:
No.
that´s why you don´t know that you can change Structure of PostgreSQL Table without "APPEND" Data ... hihi
https://www.xbaseforum.de/viewtopic.php?f=114&t=12189

don´t blame yourself with Answer like this
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Who is using PostGreSQL?

#17 Post by rdonnay »

It is made for real world companies that want to save the investments they made over the decades
Jimmy -

This is the real truth, said by someone (Tom Liehr) who has made such investments.

Learning SQL is easy, but converting a large, legacy application with 20 million bytes of code, and 51 gb of data, from ISAM to SQL is a boondoggle.

I am describing the Medallion taxi management program that I have been working on, with Bobby Drakos, for the past 23 years.
It started as a Clipper program in the mid 80's.

I have witnessed several of these boondoggles over the years.

I must give Steffen and his team great creds for their long-time commitment to this solution.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Who is using PostGreSQL?

#18 Post by skiman »

Hi Tom,

I saw your posts on the xbaseforum about the filtering. Have you already created stored procedures or functions in PostGreSql?

I was looking to find the available functions in the PL/pgSQL — SQL Procedural Language. In the Word doc from Alaska you posted, Alaska is using some in their samples. I was just wondering where the available functions can be found. Any idea if such a list exists?

In the ideal world Xbase should be available as procedural language available. Bus since Alaska never mentioned this, I suppose this won't come.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Who is using PostGreSQL?

#19 Post by Auge_Ohr »

Hi Roger,
rdonnay wrote: Wed Jan 19, 2022 10:03 am I am describing the Medallion taxi management program that I have been working on, with Bobby Drakos, for the past 23 years.
"never change a running System" ...

it will be a Big Challenge to change a "existing" System and the Question if it will be "better"
Tom have made the Step to change to PgDBE after 10 Years since we got 1st Version of PgDBE

we know ADS but PgDBE ...

---
seek for : *PGDBE* 19.01.2022
7462 O PGDBE: scope not updated after an APPEND operation
7439 O PGDBE: cannot append to ISAM table after SQL ALTER TABLE
7438 OW PGDBE: Variables unsupported in ISAM filter expressions
7416 CW PGDBE: Setting a scope is does not navigate
7375 WC Cannot connect to PostgreSQL 13 server (inv. authentication)
7371 WC PG-ISAM: DbAppend() / DbCommit() needs seconds/minutes
7360 OW PGDBE: code block not called by DbCreateIndex()
7356 OW PGDBE does not support the function OrdKeyNo()
7351 OW PGDBE may raise runtime error in skip operation
7285 C Reindex with PGDBE makes specific record unSEEKable
7269 OW Network deployment for apps w/ ADSDBE and PGDBE unsupported
7264 OW Sorting order of NTXDBE and PGDBE ISAM emulation differs
7236 WC Closing a workarea does not clean up all memory
7229 WO DbAppend fails with columns of type tsvector
7204 CW PGDBE: RecNo() changes when deleting with SET DELETED ON
7199 O PGDBE:incorrect numeric value transferred with SQL statement
7197 CW PGDBE: error after APPEND to empty table w/ filter active
7195 O PGDBE: Collation in emulated index differs from original CDX
7173 CW Using PGDBE a scope is not updated after an insert operation
7170 WC DbSeek() with active filter may find hidden record
7169 WC Skip multiple records sets eof flag wrongly
7160 C PGDBE: APPEND with filter hiding empty rec. navigates wrong
7159 C PGDBE: scope with index may incorrectly filter records
7158 OW Result of DbSeek() in softseek wrong with PGDBE
7155 O XbpQuickBrowse not properly shown with PGDBE and order
7152 WC After DbGoTo() DbSkip() navigates to Eof()
7151 WC After soft seek DbSkip() navitages to Eof()
7146 CW With PGDBE OrdSetFocus() navigates to the ghost record
7130 WO Missing runtime error for index on variable field length
7119 WC Append operation fails with ISAM table, error 8999
7104 OW Sql select via pgdbe into objects or array broken
7088 C PGDBE: DbGoBottom() with scope + index navigates to EOF
7083 C PGDBE: Seeking non-existing key value navigates to record 0
7075 C Pgdbe may set the eof() wrongly
7063 WC EOF() not reset correctly by DbGoto() with SET DELETED ON
7042 C PgDbe commits transaction on Pack and Zap operations
7038 OW $ operator not supported in filter expressions in PGDBE/ISAM
6970 OW PGDBE does not support all functions and operators in filter
6969 CW Skip behaviour differs in PGDBE compared to FOXCDX
6968 CW DbGoBottom() yields runtime error with pgdbe on large tables
6966 CW DbGoTo() via PGDBE may be slow on large tables with index
6963 OW ! operator not supported in filter expressions in PGDBE/ISAM
6962 OW Empty() not supported in filter expr. in PGDBE/ISAM
6961 OW # operator not supported in filter expressions in PGDBE/ISAM
6960 WC XbpBrowse bad performance with SET DELETED ON
6943 C Using PGDBE Eof() may return wrong result after focus change
6923 WC DbSeek() with <lLast> returns wrong result w/ ISAM emulation
6922 WC RecNo() returns 0 for ghost record using ISAM emulation
6912 WO UNIQUE and CANDIDATE ISAM indexes behave incorrect
6901 C DACSession:getLastMessage(): strange chars in msg with PGDBE
6861 CW PGDBE: IDSC or stall with 1-digit port in connection string
6856 CW Runtime error on PACK using pgdbe.dll
6848 C PGDBE: IDSC when opening ISAM table w/ SQL result set open
6840 CW On PGDBE a replace operation may forces a runtime error
6819 WC Wrong Recno() and Eof() after Zap
6795 OW Using XbpQuickBrowse with PGDBE (ISAM) yields runtime error
6789 C PGDBE: EOF() is .F. in empty SQL result set
6788 WC REPLACE REST|ALL affect only the current record in ISAM mode
6773 C PGDBE: Setting a filter may cause error during navigation
6751 C PGDBE: Deleted() returns .F. for records which are deleted
6745 C PGDBE: IDSC error when updating field in SQL result set
6744 C PGDBE: BOF() incorrect in SQL result set with SET DELETED ON
6742 CW DbUseArea on PGDBE may be time consuming
6726 C PGDBE: Commit/update fails with invalid encoding
6644 O Sample source code broken in documentation of pgdbe.
6633 C Custom indexes are not supported by the PGDBE ISAM emulation
6626 O SQL sequence fields via PGDBE are not maintained properly
6625 C SET DELETED ON with pgdbe leads to increased memory usage
6623 CW No automatic ISAM index repair on DbUseArea via PGDBE
so Tom must have "workaround" all those "O"pen Problems with PgDBE

---

i tough you want to integrate PostgreSQL in SQLQuery and also write your own "PgAdmin"

to integrate LibPQ.DLL into Xbase++ is very easy as Sample from Phil Ide show
and Code using LibPQ.DLL (v7.2.1) still work with PostgreSQL Server v12

! Note : when use LibPQ.DLL from PostgreSQL Server > 8 these *.DLL are need
libpq.dll
libeay32.dll
libecpg.dll
libecpg_compat.dll
libiconv-2.dll
libintl-8.dll
libpgtypes.dll
libxml2.dll
libxslt.dll
ssleay32.dll
zlib1.dll
! Note : LibPQ.DLL > v9 might be 64 Bit which can´t be used by Xbase++ 32 Bit
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Who is using PostGreSQL?

#20 Post by rdonnay »

"never change a running System" ...
That is something we can probably agree on.

Converting Medallion from ADS to PostGreSQL (either ISAM or SQL) would not be advised, in my opinion.

However, there are people in the world who just like to spend money and time on boondoggles so they can convince their bosses that they are making progress and can keep getting a paycheck, or a lucrative contract.

I intend to put some time into this anyway, just so I can learn something from it.
I would not bill for my time on this adventure.

When I helped Bobby with his conversion from Clipper to Xbase++, there were those who thought that making a GUI version from a text-based legacy code would be a boondoggle. Well, it turned out to be a big success - thanks to eXpress++. I like these kind of adventures when I have a willing partner like Alaska Software.
Simple UI.jpg
Simple UI.jpg (62.58 KiB) Viewed 6705 times
The eXpress train is coming - and it has more cars.

Post Reply