receiving messages from the server

View: New views
2 Messages — Rating Filter:   Alert me  

receiving messages from the server

by Toni Casueps :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have some triggers in my databse which sometimes raise an exception and other times they raise a warning, but Rekall only shows the exceptions. I've tried with psql to see if the server does send the message to the client and it shows it.
Can I configure which kind of server messages will be shown?
The server is PostgreSQL 8.0.8 under Linux.
_________________________________________________________________
Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para estar a la última
http://newsletters.msn.com/hm/maintenanceeses.asp?L=ES&C=ES&P=WCMaintenance&Brand=WL&RU=http%3a%2f%2fmail.live.com_______________________________________________
Rekall mailing list
Rekall@...
http://www.mailman.a-i-s.co.uk/cgi-bin/mailman/listinfo/rekall

Re: receiving messages from the server

by Julian-27 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
So i guess you want something like block.LastWarning() ?
The way I have things configured here is to configure rekall to do some
validation itself and return a RekallMain.messageBox() (or simular)
postgressql has the ultimate say in the end though.
But an option is to work with a postgresql function directly.
Rekall could return the message.

cursor = block.cursor("SELECT modify_mytable(<data>) ")
    RekallMain.messageBox(cursor.fetchone()[0])

I've also moved alot of insert/update/delete statements into specific
postgresql functions that trap the error via.
http://www.postgresql.org/docs/current/static/errcodes-appendix.html#ERRCODES-TABLE
The postgresql function would have (if plpgsql) something like.
BEGIN;
    BEGIN;
          <expression>
    EXECEPTION WHEN warning THEN
        RETURN <mywarning>;
    END;
END;

The <expression> could be your insert/update/delete or whatever.
This of course would be working with RekallPYDBI directly.
Just an idea.
Jules.

On Wed, 5 Dec 2007, Toni Casueps wrote:

> I have some triggers in my databse which sometimes raise an exception and
> other times they raise a warning, but Rekall only shows the exceptions.
> I've tried with psql to see if the server does send the message to the
> client and it shows it. Can I configure which kind of server messages will
> be shown?
> The server is PostgreSQL 8.0.8 under Linux.
> _________________________________________________________________
> Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para estar
> a la última
> http://newsletters.msn.com/hm/maintenanceeses.asp?L=ES&C=ES&P=WCMaintenance
>&Brand=WL&RU=http%3a%2f%2fmail.live.com_____________________________________
>__________ Rekall mailing list
> Rekall@...
> http://www.mailman.a-i-s.co.uk/cgi-bin/mailman/listinfo/rekall

_______________________________________________
Rekall mailing list
Rekall@...
http://www.mailman.a-i-s.co.uk/cgi-bin/mailman/listinfo/rekall
LightInTheBox - Buy quality products at wholesale price