X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5C3BD3CCEC2 for ; Fri, 17 Dec 2004 16:55:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48942-03 for ; Fri, 17 Dec 2004 16:55:06 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8536C3CCEBF for ; Fri, 17 Dec 2004 16:55:06 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 7AAEA31959; Fri, 17 Dec 2004 17:55:05 +0100 (MET) From: Andreas Kretschmer X-Newsgroups: pgsql.interfaces Subject: Re: plpgsql errorcodes Date: Fri, 17 Dec 2004 17:52:00 +0100 Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Orig-Path: not-for-mail User-Agent: tin/1.5.14-20020917 ("Chop Suey!") (UNIX) (Linux/2.4.18-bf2.4 (i686)) To: pgsql-interfaces@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/35 X-Sequence-Number: 5205 begin "Robert Wimmer" 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° ;-)