Re: plpgsql errorcodes - Mailing list pgsql-interfaces

From Andreas Kretschmer
Subject Re: plpgsql errorcodes
Date
Msg-id gefb92-l16.ln1@kaufbach.delug.de
Whole thread Raw
In response to plpgsql errorcodes  ("Robert Wimmer" <seppwimmer@hotmail.com>)
Responses Re: plpgsql errorcodes
List pgsql-interfaces
begin  "Robert Wimmer" <seppwimmer@hotmail.com> wrote:
> i want the DB functionality to be done by the server. this means i want to 
> write functions like

> CREATE FUNCTION insert_any(....) RETURNS INT AS '
> BEGIN

> END; '
> LANGUAGE 'plpgsql'

> returning an errorcode so i can map this errorcode to a message for the user 
> of the client. and i want to do this on the server without  using any 

You can use RAISE to generate a error.




end
Andreas
-- 
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org)     GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)


pgsql-interfaces by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Lost updates vs resumable connections/transactions
Next
From: Jens Lechtenboerger
Date:
Subject: Re: Lost updates vs resumable connections/transactions