Forum

This content is now out of date.

Visit Our Community

PostgreSQL data source – Freehand SQL query view error

Hi all,

I've succesfully succesfully set up a data source (PostgreSQL 9.4.5 on CentOS 7) for our Yellowfin 7 install (Windows 2012R2). When I try to create a view in the drag 'n drop editor, everything works. But, when I use the freehand SQL editor to create a view, which is what we intend to use, I get the following error:
[code]SQL statement is invalid.
The error message returned from the database was:
Cannot change transaction read-only property in the middle of a transaction.[/code]

This happens even when I copy the code generated by the drag 'n drop editor. This particular code runs fine in a separate SQL-client, so I guess both code and privileges are OK.

When I examine the PostgreSQL logs on the data source, I saw that Yellowfin generates some additional statements besides the query:
[code]< 2015-12-01 11:22:04.917 CET >LOG: execute : SELECT * FROM ( SELECT
"dim_kliniek"."kli_kliniek_code",
"dim_dbc_diagnose"."dia_dbc_diagnose_code",
"dim_dbc_diagnose"."dia_dbc_specialisme_code"
FROM "dwh"."dim_kliniek"
INNER JOIN "dwh"."fct_subtraject"
ON (
"dim_kliniek"."kli_id" = "fct_subtraject"."kli_id"
)
INNER JOIN "dwh"."dim_dbc_diagnose"
ON (
"fct_subtraject"."dia_id" = "dim_dbc_diagnose"."dia_id"
)
OFFSET 100 LIMIT 10 ) AS T WHERE 1 = 0
< 2015-12-01 11:22:04.918 CET >LOG: execute : SELECT c.oid, a.attnum, a.attname, c.relname, n.nspname, a.attnotnull OR (t.typtype = 'd' AND t.typnotnull), pg_catalog.pg_get_expr(d.adbin, d.adrelid) LIKE '%nextval(%' FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (c.oid = a.attrelid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef d ON (d.adrelid = a.attrelid AND d.adnum = a.attnum) JOIN (SELECT 24121 AS oid , 4 AS attnum UNION ALL SELECT 24055, 4 UNION ALL SELECT 24055, 3) vals ON (c.oid = vals.oid AND a.attnum = vals.attnum)[/code]

Again, both queries from the log run fine in a SQL-client using the same credentials. I have a feeling I'm missing something obvious here; anybody has some pointers?


Thanks,
Jelle

Hi Jelle,

I just wanted to let you know that we are troubleshooting this task via the case you opened through our CRM.

I will be reaching out to you via email rather than the forum. Please let us know if you have any questions!

Kind Regards,

Dustin
We have exactly the same problem, using a union query... this probably happened after the latest Yellowfin update... A speedy solution would be welcomed!
Thanks,
Diogo