PostGreSQL questions

Xbase++ 2.0 Build 554 or later
Message
Author
Gerrit
Posts: 12
Joined: Fri Aug 03, 2012 10:20 am

Re: PostGreSQL questions

#11 Post by Gerrit »

rdonnay wrote:
Can I ask anyone who is using PostgreSQL, which version of pgAdmin are you using?
Hi Roger, we are trying Postgres 9.3.20 and the latest Xbase++ 853 update. We have a large app and ran into some obstacles, I contacted Alaska and they emailed me back:

"Thank you very much for providing us with the sample. As a matter of fact, evaluating the filter expression fails because the filter is evaluated at the server and the server does not support the function Deleted(). You will encounter the same
issue when using other functions or operators such as the not-equal operator "#".

As a workaround and as long as this issue is not fixed yet, consider to rework your filter. For example, you can set the deleted setting to ON using the command SET DELETED ON. This is equal to your filter {|| Deleted()}. In case the filter in your sample was simplified for demonstration purposes it might be possible to modify the filter accordingly anyway.

I have created PDR 6970 to cover the issue:

http://www.alaska-software.com/scripts/ ... PDRID=6970

Please note that these PDRs already exist that point into the same direction: 6963 6962 6961

Besides of all this please let me add the following: Working with filters is not very performant. This is because the filter codeblock must be evaluated for all records that need to be read from the storage. As a consequence, the table must be completely scanned.

As a further optimization, you can consider creating an index that equals your filter. Beside of everything else, this will perform incomparably faster.

Hope this helps. "

---

I would be happy to show you how far we have come with our migration when you have some time. We have some ideas on how to make it work and be performant but could certainly use a more experienced brain looking at this.

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

Re: PostGreSQL questions

#12 Post by rdonnay »

Gerrit -

Yes, I would like to see what you have done.
Let me know when we can connect via Skype and/or Teamviewer.
The eXpress train is coming - and it has more cars.

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

Re: PostGreSQL questions

#13 Post by Auge_Ohr »

rdonnay wrote:This doesn't even compile:

Code: Select all

SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'
Cannot match to any predicted input, near <les> in table definition of FROM clause

My question is how to do this with PGDBE and the SELECT command.
You have apparently created a different interface to PostGreSQL.
it is true that i use "native" Solution but that Queue is build within PgAdmin.EXE and than copy/paste.
Table_Schema.jpg
Table_Schema.jpg (117.91 KiB) Viewed 14134 times
if it fail to compile it is Xbase++ and not my Queue !
greetings by OHR
Jimmy

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

Re: PostGreSQL questions

#14 Post by Auge_Ohr »

Gerrit wrote: ... does not support the function Deleted().

As a workaround and as long as this issue is not fixed yet, consider to rework your filter. For example, you can set the deleted setting to ON using the command SET DELETED ON. This is equal to your filter {|| Deleted()}. In case the filter in your sample was simplified for demonstration purposes it might be possible to modify the filter accordingly anyway.
seems Alaska does not know about its own "internal fields" ... :doh:

there is a internal field "__deleted" so you can set "Filter" this Way

Code: Select all

SELECT * FROM MyTable WHERE __deleted = false LIMIT 100
greetings by OHR
Jimmy

User avatar
PedroAlex
Posts: 234
Joined: Tue Feb 09, 2010 3:06 am

Re: PostGreSQL questions

#15 Post by PedroAlex »

rdonnay wrote:
I have workstations runing on Win7 and Win10
I works fine for me.
Are you using PGDBE or ODBCDBE (or maybe SQLexpress) ?

Are you working in ISAM mode or all SQL statements?
I´m using PGDBE and SQL statements.

I'm doing small things, like insert, find and update data.
I´m using only xBase++

I'm taking the first steps. on this technology, but I´m sure this is the future of our Data Files.
I'm searching a solid way to migrate all DBF´s to SQL.

All the time invested in this knowledge, is a future warranty...
Pedro Alexandre

Gerrit
Posts: 12
Joined: Fri Aug 03, 2012 10:20 am

Re: PostGreSQL questions

#16 Post by Gerrit »

Auge_Ohr wrote:
there is an internal field "__deleted" so you can set "Filter" this Way

Code: Select all

SELECT * FROM MyTable WHERE __deleted = false LIMIT 100
Hi Jimmy, our application uses only DBFCDX Isam navigational code only. (Filters, Scopes, Seeks - Open, Close and Aliases etc) We are trying to find out how to get our App to run with Postgres using minimal code changes while still being performant. We need to find some time to do this.

For future features, we certainly can use SQL statements in development.

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

Re: PostGreSQL questions

#17 Post by Auge_Ohr »

Gerrit wrote:... to run with Postgres using minimal code changes while still being performant.
good luck ... :roll:

i have try this Way 5 Years ago and after a while i begin to build my own "native" Interfaces for PostgreSQL, MySQL and Sqlite :dance:
greetings by OHR
Jimmy

Post Reply