Missing FROM-clause entry for table HTTEMP123...

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Missing FROM-clause entry for table HTTEMP123...

Postby Bernd.N » Wed Jan 27, 2016 12:54 pm

We see entries in the Server log like
org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "HTTEMP1482141051962108"

It seems that a SQL statement that Servoy generated with some temporary tables can not be processed by postgres.
The first part of such a SQL statement looks like this:

select project_elements.project_element_id from project_elements project_elements
inner join projects projects on project_elements.project_id=projects.project_id and (projects.tenant_id = ? or projects.tenant_id is null) and (projects.is_deleted = ? or projects.is_deleted is null)
and "HTTEMP1482141051962108".svy_check__1482141052 is not null
left outer join HT_TEMP_1482141051 "HTTEMP1482141051962108" on projects.project_id="HTTEMP1482141051962108".project_id_1482141053
where ...

Due to which reason does Servoy insert those temporary tables, and is it possible to avoid that behaviour, so that postgres does not fail?
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 544
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Missing FROM-clause entry for table HTTEMP123...

Postby grahamg » Fri Jan 29, 2016 11:05 am

Bernd

I've seen also those entries in the Server log and think they are related to the use AddTableFilterParam where a query is trying to work on records that are outside the FilterParam.

I had a screen that listed all Global stockholders and made various calculations based on their stock and my suspicion was that this error was thrown when it was used by Sales Staff who only had access to a limited number of stockholders. Could not reproduce consistently so changed the way that Stock was presented.

If Servoy/Postgres gurus have an explanation I'd be very interested though.
Graham Greensall
Worxinfo Ltd
www.worxinfo.com
grahamg
 
Posts: 752
Joined: Fri Oct 03, 2003 3:15 pm
Location: Midlands UK

Re: Missing FROM-clause entry for table HTTEMP123...

Postby rgansevles » Fri Jan 29, 2016 12:07 pm

Bernd,

Servoy adds a joint to a temporary table when a condition cannot be expressed in the sql straight away.

Please file a case in the Servoy Support system with a sample solution that shows this issue.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: Missing FROM-clause entry for table HTTEMP123...

Postby Bernd.N » Fri Jan 29, 2016 6:01 pm

Hi Rob,

thanks for the hint, now I know where we have to search. We will track down where the SQL statement is produced and post a case.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 544
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: Google [Bot] and 8 guests

cron