RowsAfffected with RETURNING (Postgres)
Posted: Mon 20 Jan 2020 17:02
Hi,
i have a problem with the RowsAffected-Property in combination with RETURNING under Postgres.
Step 1:
Step 2:
UniQuery1.RowsAffected is -1 and UniQuery1.FieldByName('k').AsInteger is 1.
But UniQuery1.RowsAffected has to be 1.
In pgAdmin the result is correct so it must be a problem with you components.
i have a problem with the RowsAffected-Property in combination with RETURNING under Postgres.
Step 1:
Code: Select all
UniQuery1.SQL.Text := 'CREATE TEMPORARY TABLE Test (k serial primary key, v integer)';
UniQuery1.ExecSQL;
Code: Select all
UniQuery1.SQL.Text := 'INSERT INTO Test (k, v) VALUES (DEFAULT, 1) RETURNING k';
UniQuery1.ExecSQL;
But UniQuery1.RowsAffected has to be 1.
In pgAdmin the result is correct so it must be a problem with you components.