Page 1 of 1

RAISE NOTICE event on Zeos

Posted: 01.03.2007, 08:02
by dayat
is there any event when RAISE NOTICE run in plpgsql.

thank you of its aid

Posted: 01.03.2007, 10:35
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...

Posted: 21.03.2007, 15:41
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 :-(

Posted: 21.03.2007, 16:11
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

Posted: 21.03.2007, 16:23
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

Posted: 21.03.2007, 17:23
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

Posted: 26.04.2007, 09:25
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