View Full Version : QtSql strange results after postgres stored function call

15th October 2014, 11:36
Hello. My program using postgresql database. I've migrated from Qt4 to Qt5, everything it's ok, but calling database stored functions, that returns Postgres "character varying" always returns empty string. Calling this function in CLI (psql) returns correct cyrillic string. Performing direct select-queries to database tables, containing cyrillic fields also returns correct cyrillic strings.

Also, calling all of stored functions thas return strings (even consists from latin characters) - returns an empty string.

15th October 2014, 11:45
Are there any threads involved?

15th October 2014, 11:50
No, this is usual GUI single-threaded application.

15th October 2014, 13:08
Can we see some actual code?

16th October 2014, 14:05
Thanks, i've found reason. I am using named parameters and bindValue of QSqlQuery. In my database tables and functions names look like "prefix$object_name". Escaping $ symbol fully solves the problem. Is it correct behaviour? I am not mixing named and positional parameters,