Page 1 of 1

PostgreSQL - How to prevent statement to be prepared?

Posted: 17.06.2017, 00:29
by ertank
Hello,

1- PostgreSQL does not allow multiple statements if it is prepared.
2- PostgreSQL can work with multiple statements executed as they are.

I need to use multiple statements in TZQuery. I get all statements prepared even if I have doPreferPrepared set to False. Is it possible to tell TZQuery not to prepare the statements?

Thanks.

Ertan

Re: PostgreSQL - How to prevent statement to be prepared?

Posted: 17.06.2017, 16:19
by miab3
Why do not you use ZSQLProcessor?

Michal

Re: PostgreSQL - How to prevent statement to be prepared?

Posted: 17.06.2017, 21:41
by ertank
No particular reason, I just saw the option and tried to use TZQuery.

Ertan

Re: PostgreSQL - How to prevent statement to be prepared?

Posted: 18.06.2017, 13:46
by marsupilami
Hello Ertan,

currently there is no option to do that. You possibly can achieve it by modifying ZDbcPostfgreSQL.pas. Make sure that CreateRegularStatement and CreatePreparedStatement return a TZPostgreSQLClassicPreparedStatement instead of a TZPostgreSQLCAPIPreparedStatement.

With best regards,

Jan