RAISE NOTICE event on Zeos

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Post Reply
dayat
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 01.03.2007, 04:41
Location: Banda Aceh
Contact:

RAISE NOTICE event on Zeos

Post by dayat »

is there any event when RAISE NOTICE run in plpgsql.

thank you of its aid
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Bad news... as far as I know the components do not support events yet. This feature is on the wish list. Unfortunately the programmer to implement it is on the same list. So... Who wants to implement this? just step forward...
snorkel
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 01.09.2005, 18:55
Location: Milwaukee USA

Post by snorkel »

mdaems wrote:Bad news... as far as I know the components do not support events yet. This feature is on the wish list. Unfortunately the programmer to implement it is on the same list. So... Who wants to implement this? just step forward...
It's not as bad as you think. I was talking to a former Zeos developer who's name I can't mention, but he said the notification support was in Zeos years ago, so I wonder if it was in 5.x and never made it to 6, or the low level support is in Zeos 6.x but has never been surfaced as a event.

I had to stop using Zeos because of the lack of notification support :-(
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

I think the OP was talking about something other than LISTEN / NOTIFY. (http://www.postgresql.org/docs/8.2/inte ... otify.html)

RAISE NOTICE is similar to RAISE EXCEPTION and used in PL/pgSQL functions to return messages within the function call without aborting the transaction.

See here: http://www.postgresql.org/docs/8.2/inte ... sages.html

Regards,

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

Post by mdaems »

Yes, I heard about that before. I don't know why you can't name your source, but maybe he can point you to the solution or a way to implement it. I'm not a PostGres user, so even if we find the lost coding, we need somebody with Postgres experience to reimplement it. One can't just program without testing.

I'm sure other databases could benefit from this work again. Pushing data to the application is something a lot of developers want.

Can you provide us with more info?

@Ben : I think the OP wanted to catch the errors raised on the server.
From the page you refer to:
Whether messages of a particular priority are reported to the client, written to the server log, or both is controlled by the log_min_messages and client_min_messages configuration variables
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

@Ben : I think the OP wanted to catch the errors raised on the server.
Maybe, but RAISE NOTICE is different to LISTEN / NOTIFY which is what was supported by previous versions of ZeosLib, that's all I was saying.

On PostgreSQL's command line:

Code: Select all

postgres=# listen some_message;
LISTEN
postgres=# notify some_message;
NOTIFY
Asynchronous notification "some_message" received from server process with PID 26358.
postgres=#
or

Code: Select all

postgres=# create function test_function() RETURNS VOID as
postgres-# $body$
postgres$# begin
postgres$#   RAISE NOTICE 'Hi There';
postgres$# end;
postgres$# $body$
postgres-# LANGUAGE 'plpgsql';
CREATE FUNCTION
postgres=# SELECT test_function();
NOTICE:  Hi There
 test_function
---------------

(1 row)

postgres=#
I would see RAISE NOTICE support being an event or property of the TZStoredProc or TZQuery, where LISTEN / NOTIFY could be a property of ZConnection.

Regards,

Ben
dayat
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 01.03.2007, 04:41
Location: Banda Aceh
Contact:

Post by dayat »

snorkel wrote:
mdaems wrote:Bad news... as far as I know the components do not support events yet. This feature is on the wish list. Unfortunately the programmer to implement it is on the same list. So... Who wants to implement this? just step forward...
It's not as bad as you think. I was talking to a former Zeos developer who's name I can't mention, but he said the notification support was in Zeos years ago, so I wonder if it was in 5.x and never made it to 6, or the low level support is in Zeos 6.x but has never been surfaced as a event.

I had to stop using Zeos because of the lack of notification support :-(
I see in zeosdbo-5.5 figure in TZPGSQLNOTIFY, but cannot be installed at turbo delphi pro caused by code which unknown to. hopefully all developer will reenter version components 5.5 returning to version come. thank you
Post Reply