Re: [SQL] User Defined Functions Errors

2005-04-19 Thread KÖPFERL Robert
Have a try with RAISE NOTE or RAISE EXCEPTION keep in mind that exceptions should be exceptional. So a good idea of whether to use them is to ask 'Do I expect such error' or 'is an explicit error useful for the caller'. I'ts often better to just return an empty relation |-Original Message-

Re: [SQL] User Defined Functions Errors

2005-04-18 Thread Michael Fuhr
On Mon, Apr 18, 2005 at 10:32:26PM +0400, A. Kulikov wrote: > > How to I return an error from inside a user defined function? Use RAISE. See "Errors and Messages" in the PL/pgSQL documentation. http://www.postgresql.org/docs/8.0/interactive/plpgsql-errors-and-messages.html -- Michael Fuhr http