Page 1 of 1

PostgreSQL - Temporary tables are always read only

Posted: Thu 10 Oct 2019 06:38
by JamesInform
Hi!

I have upgraded to UniDAC 8.0.1 from version 7.4.12 and experienced that when I open a temporary table in PostgreSQL using an UniQuery, the UniQuery is read only and I get an exception, if I want to e.g. insert a new record.

The error occured consistently in PostgreSQL 11 as well as in PostgreSQL 12.

Example to reproduce the issue:

Code: Select all


UniConnection1.ExecSQL('create temp table mytemp(a int8 primary key, d json)');
UniQuery1.sql.text := 'select * from mytemp';
UniQuery1.active := true;
UniQuery.insert;   <<<====== This gives an exception that the dataset is read only

But when using a normal persistent table (not temporary) it works like expected:

Code: Select all


UniConnection1.ExecSQL('create table mytemp(a int8 primary key, d json)');
UniQuery1.sql.text := 'select * from mytemp';
UniQuery1.active := true;
UniQuery.insert;   <<<====== Now everything works without error !!!!

With UniDAC Version 7.4.12 the error does not occur!

I suspect the following bug fix to be responsible for this behaviour:
Version 7.5.13 (24-Jun-19): Bug with attempting to save data to read-only fields when modifying a dataset is fixed

Please provide me with a short feedback on this issue!

Re: PostgreSQL - Temporary tables are always read only

Posted: Thu 17 Oct 2019 17:49
by JamesInform
Hi Devart Team

It world be very nice, if you just gave a short feedback on this. Something like „We can‘t reproduce the issue ...“ or „We know about this and are working on a fix ...“ or „This is the expected behavior ...“.

But no response since a week might sound to your customers as if you don‘t care! And many parts of our current code is not running anymore!

Or is there another way of reporting those issues to you and to get a feedback?

Regards,
James

Re: PostgreSQL - Temporary tables are always read only

Posted: Fri 18 Oct 2019 11:43
by MaximG
To run this code, please use the protocol version 3.0 in PostgreSQL data access provider:

Code: Select all

UniConnection.SpecificOptions.Values['ProtocolVersion'] := 'pv30';