Postgre SQL Events Alerter

Code patches written by our users to solve certain "problems" that were not solved, yet.

Moderators: gto, cipto_kh, EgonHugeist, mdaems

mrLion
Senior Boarder
Senior Boarder
Posts: 71
Joined: 20.03.2010, 10:17

Postby mrLion » 01.06.2010, 19:34

silvioprog, mdaems, HI !

Here is a code that I mentioned in a previous message. Here and there, tried to write comments English. However, the code is fairly transparent.

Yes. More. This code is tied to the version 7.0.0 alpha. True code components had slightly modified in order to gain direct access to the API PostgreSQL. Can you please explain to me why it was encapsulated?! WHY?
Standardization of the interface is still not possible because each database uses its API ... A Delphi interface - and you can not half work.

Long live C + +! :)

Code: Select all

//-- DESIGNED FOR CodeGear RAD Studio 2010 & lightly modifyed version ZEOS 7.0.0 alpha!
//-- in ZEOS - src\plain\ZPlainPostgreSqlDriver.pas :
/*
  add after TZPOSTGRESQL_API = record ..... end; :

   PAPI = ^TZPOSTGRESQL_API;

  in define IZPostgreSQLPlainDriver before "end;"
  add:
        function GetPlainFunc():PAPI; ///Rog

  in   TZPostgreSQLBaseDriver = class(TZ....
  at the end of class definition- add:

     function GetPlainFunc():PAPI; ///rog

 and function body (implementation section of unit):

 // rog
 function TZPostgreSQLBaseDriver.GetPlainFunc():PAPI;
 begin
  result:= @POSTGRESQL_API;
 end;

   My note:
   This mods maked for easy acess to plain Postgres API interface, not
   use Delphi as interface-transmitter! I can`t understand, why pascal-programmers
   do its anytime?????!!!!! :) C/C++ FOREVER!

   Hidding plain API, on my mind, don`t needed - vary BAD IDEA.

*/
You do not have the required permissions to view the files attached to this post.

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 14.06.2010, 23:54

silvioprog,

Thanks for the second version of the component code. I just commited it to testing branch (as you probably know, trunk comes later).

Concerning the problem raised by mrLion, do you know how this could be solved?

Mark
Image

mrLion
Senior Boarder
Senior Boarder
Posts: 71
Joined: 20.03.2010, 10:17

Postby mrLion » 15.06.2010, 16:48

mdaems, see to code in my prev post.

mdaems, This problem is solved very simply. I laid out the code. True to C ++... But I think that will understand. There is nothing complicated there.
Oh, and here's another post the code for the integration ZEOS 7.0.0 with FastReport 4.9. The code in Delphi 2010, and the project only for this version. Also not yet ready to integrate with FastScript. As always - time - a very limited resource! :) Sorry.
You do not have the required permissions to view the files attached to this post.

rjuju
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 04.12.2008, 12:44

Postby rjuju » 17.08.2011, 10:42

Hello everyone

I tried to use this component, it works and i receive notification, but I can't receive the text that are sent with a command like "notify channel, 'my message';", so that I only receive the channel name :/

Do you have any clue to get it works or did I forgot something ?

Thanks :)

mrLion
Senior Boarder
Senior Boarder
Posts: 71
Joined: 20.03.2010, 10:17

Postby mrLion » 17.08.2011, 16:27

rjuju, Friend, this component is very crude. I use a different code written in C + +, which can get the desired result. And among other things, what you want - implemented only in version PostgreSQL 9.x. So use the database version 9.x and above. True to her not been working for himself ZEOS.

Oh, and code in C + +, I can give. Make it out - you can use.


Return to “User Patches”

Who is online

Users browsing this forum: No registered users and 1 guest