El día miércoles, junio 22, 2022 a las 08:39:31 +0200, Matthias Apitz escribió:
> > EXEC SQL SELECT currtid2(:table ::text, :oldCTID ::tid) INTO :newCTID;
> >
> > ...
>
> Hello Tom,
>
> We came accross cases where the above SELECT returns as :newCTID the
> same as the :oldCTID. The :oldCTID was
El día Wednesday, June 01, 2022 a las 09:46:17AM -0400, Tom Lane escribió:
> ...
>
> > Is this function currtid2() not meant to be used in ESQL/C? Or did we
> > something wrong in ESQL/C?
>
> This is not about currtid2, this is a fundamental misunderstanding
> of how ECPG works. You can only in
Matthias Apitz writes:
> So far so good, but we do need this in ESQL/C. There the code looks as:
> EXEC SQL BEGIN DECLARE SECTION;
> charstmt[255];
> static char newCTID[80];
> EXEC SQL END DECLARE SECTION;
> memset(stmt, 0, sizeof(stmt));
> sprin