res:=TRestBatch.Create(DBsrv.Orm,TormMobMetav,1000,[boInsertOrReplace,boExtendedJson]);
The SQL query as I can see from mormot.db.sql.postgres, line 730 is:
'replace into pchrdb.m_mdmetav (ID,typ,sid,nam,nam2,nam3,nam4,act,sor) values (unnest(?::int8[]),unnest(?::int8[]),unnest(?::int8[]),unnest(?::text[]),unnest(?::text[]),unnest(?::text[]),unnest(?::text[]),unnest(?::int8[]),unnest(?::int8[]))'
I am getting an exception in mormot.db.raw.postgres.pas line 334.
'ERROR: syntax error at or near "replace"'#$A'LINE 1: replace into pchrdb.m_mdmetav (ID,typ,sid,nam,nam2,nam3,nam4...'#$A' ^'#$A
and an errCode that it must be overflowed
that come in the stack from mormot.db.sql.postgres, line 269
PQ.Check(fPGConn, 'Prepare',PQ.Prepare(fPGConn, pointer(aName), pointer(aSql), aParamCount, nil));
How to overcome the above? The log is in this gist: https://gist.github.com/dkounal/e394d2a … 5110ea76ee
if the call is repeated, probably due to the previous failure, the prepared statement does not exist in the cache and I am getting:
'ERROR: prepared statement "08" does not exist'#$A
Is it expected to be handled by me or by the framework?