Re: [SQL] Use of RETURN in pl/pgsql function

2001-02-07 Thread Jie Liang
You may try like: if block end if; return somefakething; no matter this return can be reached or not. then compile will be no problem. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Wed, 7 F

Re: [SQL] Use of RETURN in pl/pgsql function

2001-02-07 Thread Tom Lane
Jeff Eckermann <[EMAIL PROTECTED]> writes: > I'll be hornswoggled: that works. > I hadn't expected a problem, simply because I knew the range in advance: Odd. Maybe there is a compile-time, rather than run-time, check in plpgsql for falling off the end without a RETURN? I haven't looked ...

RE: [SQL] Use of RETURN in pl/pgsql function

2001-02-07 Thread Jeff Eckermann
nsider every mystery, I'd never get any work done:-). Thanks very much for your help (again). > -Original Message- > From: Tom Lane [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, February 07, 2001 12:48 PM > To: Jeff Eckermann > Cc: '[EMAIL PROTECTED]' >

Re: [SQL] Use of RETURN in pl/pgsql function

2001-02-07 Thread Tom Lane
Jeff Eckermann <[EMAIL PROTECTED]> writes: > I thought (based on recent posts) that this use of RETURN is allowed, but > when trying an insert to report_table, I get the following error: > ERROR: control reaches end of trigger procedure without RETURN Looks to me like you didn't cover the case w

[SQL] Use of RETURN in pl/pgsql function

2001-02-07 Thread Jeff Eckermann
My script is below. I thought (based on recent posts) that this use of RETURN is allowed, but when trying an insert to report_table, I get the following error: ERROR: control reaches end of trigger procedure without RETURN I have solved several problems in getting to this point, but have now r