Page 1 of 1

Postgresql reception message from database

Posted: 05.12.2008, 09:52
by nestermihai
How can reception message from database Postgresql 8 in application write in Lazarus?
For example: user send comand for delete record, and in Postgrsql 8 in triger DELETE, for this record, appli RAISE EXCEPTION 'Operatiune message.....!';
How can reception this message in Lazarus application when use Zeoslib components?

Tanks very much!

Posted: 05.12.2008, 12:13
by mariuszekpl
can you publish sample application ?
You don't have EXCEPTION MESAGE ?

Posted: 05.12.2008, 12:44
by seawolf
I suppose you need to use listen and notify function which are currently not implemented

Posted: 05.12.2008, 15:14
by btrewern
LISTEN and NOTIFY are slightly different. I think the OP is talking about RAISE NOTICE and RAISE EXCEPTION which can be used in stored procedures to display messages. See here http://www.postgresql.org/docs/8.3/inte ... sages.html

I thought there was a patch in the testing version which logged these messages to the TZSQLMonitor file. Can't find the forum thread at the moment.

Ben

Posted: 06.12.2008, 15:15
by mdaems
btrewern,

You're talking about
- Topic http://zeos.firmos.at/viewtopic.php?t=2021
- Commit 487 in testing branch (Single feature patch)
- Commit 491 which merged this feature to 6.6-patches
- Release 6.6.4 : already contains this 'feature'

Mark