Skip site navigation (1) Skip section navigation (2)

Re: plpgsql errorcodes

From: Andreas Kretschmer <andreas_kretschmer(at)despammed(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: plpgsql errorcodes
Date: 2004-12-17 16:52:00
Message-ID: gefb92-l16.ln1@kaufbach.delug.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
begin  "Robert Wimmer" <seppwimmer(at)hotmail(dot)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° ;-)

In response to

Responses

pgsql-interfaces by date

Next:From: Jens LechtenboergerDate: 2004-12-17 17:04:33
Subject: Re: Lost updates vs resumable connections/transactions
Previous:From: Andreas KretschmerDate: 2004-12-17 16:39:58
Subject: Re: restore a plpgsql function with pg_restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group