Hi,
I have received this request from a customer and wanted to have some feedback from you.
I request your feedback on the possibility to improve the PLEX when generating queries SELECT FOR UPDATE, so that allows the use of the code generated by PLEX, with other database engines.
The example received:
Currently Plex generates queries SELECT FOR UPDATE, like this:
SELECT T1.deptno, T1.dname, T1.loc FROM T1 public.dept
where (T1.deptno = 10) and (T1.loc = 'NEW YORK') FOR UPDATE OF T1.deptno, T1.dname, T1.loc
ERROR: FOR UPDATE must specify unqualified names relation
LINE 2: ... no = 10) and (T1.loc = 'NEW YORK') FOR UPDATE OF T1.deptno ...
To get around this error in the database engine PostGreSQL / EnterpriseDB is necessary, remove the following:
SELECT T1.deptno, T1.dname, T1.loc FROM T1 public.dept
where (T1.deptno = 10) and (T1.loc = 'NEW YORK') FOR UPDATE OF T1.deptno, T1.dname, T1.loc
and thus the query generated in:
SELECT T1.deptno, T1.dname, T1.loc FROM T1 public.dept
where (T1.deptno = 10) and (T1.loc = 'NEW YORK') FOR UPDATE
What is your oppinion?
Thank you in advance, Antonio.