PostgreSQL - Temporary tables are always read only

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
JamesInform
Posts: 13
Joined: Sun 11 May 2014 18:28

PostgreSQL - Temporary tables are always read only

Post by JamesInform » Thu 10 Oct 2019 06:38

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!

JamesInform
Posts: 13
Joined: Sun 11 May 2014 18:28

Re: PostgreSQL - Temporary tables are always read only

Post by JamesInform » Thu 17 Oct 2019 17:49

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

MaximG
Devart Team
Posts: 1438
Joined: Mon 06 Jul 2015 11:34

Re: PostgreSQL - Temporary tables are always read only

Post by MaximG » Fri 18 Oct 2019 11:43

To run this code, please use the protocol version 3.0 in PostgreSQL data access provider:

Code: Select all

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

Post Reply