PostgreSQL - How to prevent statement to be prepared?

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
ertank
Junior Boarder
Junior Boarder
Posts: 37
Joined: 02.06.2017, 12:00

PostgreSQL - How to prevent statement to be prepared?

Postby ertank » 17.06.2017, 00:29

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

miab3
Zeos Test Team
Zeos Test Team
Posts: 943
Joined: 11.05.2012, 12:32
Location: Poland

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

Postby miab3 » 17.06.2017, 16:19

Why do not you use ZSQLProcessor?

Michal

ertank
Junior Boarder
Junior Boarder
Posts: 37
Joined: 02.06.2017, 12:00

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

Postby ertank » 17.06.2017, 21:41

No particular reason, I just saw the option and tried to use TZQuery.

Ertan

marsupilami
Gold Boarder
Gold Boarder
Posts: 661
Joined: 17.01.2011, 14:17

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

Postby marsupilami » 18.06.2017, 13:46

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


Return to “ZeosLib 7.2 Forum”

Who is online

Users browsing this forum: No registered users and 1 guest