Gambas PostgreSQL pg_attrdef.adsrc

Ask about the individual Gambas components here.
Post Reply
bouncy
Posts: 1
Joined: Friday 29th July 2022 12:49am

Gambas PostgreSQL pg_attrdef.adsrc

Post by bouncy »

I had been running PostgreSQL with Gambas on a Debian Jessie for quite a while with no problems. Then the hard drive started showing signs of failure. But the PostgreSQL data was saved. I have now installed Debian Bullseye running PostgreSQL 13 with Gambas 3.15.2.

1) Connecting programmatically by creating a connection works fine. Querrying the tables with SQL statements works fine through this connection.
2) When I try to use a form which has datacontrols on it, I get the error below.
3) On the form with data controls, even the connection associated with that form does not work. Even if the login parameters are the same as using the programmaticaly created connection.

The error is:
Unable to load table 'tblpwds'.
Unable to get field info: ERROR: column pg_attrdef.adsrc does not exist
LINE 1: ... pg_attribute.atttypmod, pg_attribute.attnotnull, pg_attrdef...

I have read many articles dealing with the PostgreSQL depricated "pg_attrdef.adsrc", all basically saying to delete it since it's been dropped as of PostgreSQL version 12.
Is there anyone out there that has dealt with this problem and how did you resolve it. Thank you.

====================================================================================================
====================================================================================================
2022/07/31
I have replaced the hard drive on the old system and re-installed Debian Jessie (version 8). PostgreSQL 9.4, Gambas v3.5.4 and pgAdmin3 which are the versions that are packaged with Debian Jessie. The backup has been restored and everything works beautifully.

On the Debian Jessie system, in pgAmin3, I can find and entry for "pg_attrdef.adsrc" if I navigate through the different objects listed.
Example: my_database -> Catalogs (2) -> PostgreSQL (pg_catalog) -> Tables -> pg_attrdef
So "pg_attrdef" is a table that was created by the system and it has four fields: adrelid, adnum, adbin, adsrc.

Below is an example of one of the 60 entries in the table "pg_attrdef":
16588;16584;10;"{FUNCEXPR :funcid 316 :funcresulttype 701 :funcretset false :funcvariadic false :funcformat 2 :funccollid 0 :inputcollid 0 :args ({CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location 352 :constvalue 4 [ 0 0 0 0 0 0 0 0 ]}) :location -1}";"0"

On the new system (Debian Bullseye (11), I have Libre Office Version: 7.0.4.2 installed. Using Libre Office Base I can make a connection and have full access to all databases and tables. There is no data missing. Also it does list the PostgreSQL catalog entry "pg_attrdef".

On the new system (Debian Bullseye (11), I have phppgadmin version 7.13.0 installed. I can make a connection and have full access to all databases and tables. There is no data missing.

Why are there two other PostgreSQL softwares working but Gambas is not.
What does Gambas need?
What can I do?
Any leads would be appreciated.
Thank you.
Post Reply