Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 74A041337B8B for ; Tue, 25 Jan 2011 11:07:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 44468-06-3 for ; Tue, 25 Jan 2011 15:07:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 171421337B77 for ; Tue, 25 Jan 2011 11:07:07 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p0PF6ktb020378; Tue, 25 Jan 2011 10:06:46 -0500 (EST) To: MoNiLlO cc: pgsql-sql@postgresql.org Subject: Re: Control reached end of trigger procedure without RETURN In-reply-to: <4D3E9764.8050904@adinf.es> References: <397A0940-896A-4DEF-873A-907976E8400B@adinf.es> <4D3E9764.8050904@adinf.es> Comments: In-reply-to MoNiLlO message dated "Tue, 25 Jan 2011 10:27:00 +0100" Date: Tue, 25 Jan 2011 10:06:46 -0500 Message-ID: <20377.1295968006@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/78 X-Sequence-Number: 35025 MoNiLlO writes: > When I launch one insert returns error: > I put the function and the returned error. > CREATE OR REPLACE FUNCTION ventas_det_a_ventas_imp() > RETURNS trigger AS > ... > ERROR: control reached end of trigger procedure without RETURN > CONTEXT: PL/pgSQL function "ventas_imp_a_ventas_cab" The function that's lacking a RETURN is not the one you're showing us. regards, tom lane