Base-Multiple errors in Postgresql log

Hello,
I’m using a database connected to PostgreSQL 9.6.
there are some simple forms and others more complex (5 levels of subforms).

When loading subform including at least one subform, many error messages are generated by PostgreSQL:

STATEMENT: SELECT * FROM “public”.“logement” WHERE ( 0 = 1 ) AND ( ( ( “public”.“logement”.“id” = :link_from_id_logement ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 88
STATEMENT: SELECT * FROM “public”.“immeuble” WHERE ( 0 = 1 ) AND ( ( ( “public”.“immeuble”.“id” = :link_from_immeuble ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 82
STATEMENT: SELECT * FROM “public”.“ville” WHERE ( 0 = 1 ) AND ( ( ( “public”.“ville”.“id” = :link_from_adresse_ville ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 94
STATEMENT: SELECT * FROM “public”.“code_postal” WHERE ( 0 = 1 ) AND ( ( ( “public”.“code_postal”.“id” = :link_from_adresse_cp ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 78
STATEMENT: SELECT * FROM “public”.“rue” WHERE ( 0 = 1 ) AND ( ( ( “public”.“rue”.“id” = :link_from_adresse_rue ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 96
STATEMENT: SELECT * FROM “public”.“l_zone_rue” WHERE ( 0 = 1 ) AND ( ( ( “public”.“l_zone_rue”.“id_rue” = :link_from_adresse_rue ) AND ( “public”.“l_zone_rue”.“numero_rue_de” = :link_from_numero_rue ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 82
STATEMENT: SELECT * FROM “public”.“zones” WHERE ( 0 = 1 ) AND ( ( ( “public”.“zones”.“id” = :link_from_id_zone ) ) AND ( 0 = 1 ) )

ERROR: syntax error at or near “:” at character 92
STATEMENT: SELECT * FROM “public”.“l_cq_rue” WHERE ( 0 = 1 ) AND ( ( ( “public”.“l_cq_rue”.“id_rue” = :link_from_adresse_rue ) AND ( “public”.“l_cq_rue”.“numero_rue_de” = :link_from_numero_rue ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 104
STATEMENT: SELECT * FROM “public”.“contrat_quartier” WHERE ( 0 = 1 ) AND ( ( ( “public”.“contrat_quartier”.“id” = :link_from_id_cq ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 84
STATEMENT: SELECT * FROM “public”.“usager” WHERE ( 0 = 1 ) AND ( ( ( “public”.“usager”.“id” = :link_from_id_proprietaire ) ) AND ( 0 = 1 ) )
ERROR: syntax error at or near “:” at character 84
STATEMENT: SELECT * FROM “public”.“usager” WHERE ( 0 = 1 ) AND ( ( ( “public”.“usager”.“id” = :link_from_id_usager ) ) AND ( 0 = 1 ) )
*

Forms are working correctly but loading is very slow, probably due to those errors.

Somebody has a good idea ?

Connectors SDBC et JDBC give same result
Have tried with Mac & Linux Ubuntu 16.04 version → same result

LibreOffice 5.3.3.1

Mac OSX 10.12

Spent the better part of today looking into this. Although I don’t use PostgreSQL on a regular basis, I have it installed on Xubuntu 16.04 for testing purposes.

In researching your problem, I arrive at the same results as you have. Tried multiple JDBC connectors and SBDC only to have the same problem over & over. You are right in that it doesn’t affect the record processing. I see no slowing in the process, but I also didn’t use any tables of any size. There were no errors when just updating any of the tables individually, just when using subforms. I also had no problems with Queries or modifications made when using SQL Workbench/J.

I searched but found no bugs listed for this. It would be a good idea if you created one stating your problem. You can do so on Bugzilla - click here.

Have seen many other problems in past bug reports regarding this SBDC.

Thanks for having tried to reproduce it.
Have created a new bug on Bugzilla.

Humm? I think because ( 0 = 1 ) included two places in each of your SELECT statements evaluates to False, then all of your SELECT statements evaluate to essentially

WHERE False AND something AND False

which further evaluates to

WHERE False

and thus they produce nothing at all.

This problem exist in all OO/LO versions from OO 3.1.2, where the *.odb database advanced connections settings have been greyed out. In OO 3.1.1 change the advanced connection settings , check Replace named parameters ‘?’ can remove all these syntax error shown in postgresql log on Form:Subform links ( on load, on refresh etc).