From: Andreas Kretschmer <andreas_kretschmer@despammed.com>
To: pgsql-interfaces@postgresql.org
Subject: Re: plpgsql errorcodes
Date: Fri, 17 Dec 2004 17:52:00 +0100
Message-ID: <gefb92-l16.ln1@kaufbach.delug.de> (raw)
References: <BAY10-F10DF16D4924A5135BC8DC8D0AE0@phx.gbl>
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° ;-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: andreas_kretschmer@despammed.com
Subject: Re: plpgsql errorcodes
In-Reply-To: <gefb92-l16.ln1@kaufbach.delug.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox