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
Post Reply
ertank
Senior Boarder
Senior Boarder
Posts: 53
Joined: 02.06.2017, 12:00

PostgreSQL - How to prevent statement to be prepared?

Post 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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

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

Post by miab3 »

Why do not you use ZSQLProcessor?

Michal
ertank
Senior Boarder
Senior Boarder
Posts: 53
Joined: 02.06.2017, 12:00

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

Post by ertank »

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

Ertan
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

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

Post 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
Post Reply