Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0270F1337BCF for ; Tue, 25 Jan 2011 11:25:00 -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 48984-06-2 for ; Tue, 25 Jan 2011 15:24:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mail.postgresql.org (Postfix) with ESMTP id 9DB47133798E for ; Tue, 25 Jan 2011 11:24:48 -0400 (AST) Received: by mail-ww0-f50.google.com with SMTP id 26so5160431wwf.19 for ; Tue, 25 Jan 2011 07:24:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=n7oSFNUjr6SQ1RhhtT4/5GiSwfe8nOPhRVboKyznnnI=; b=dONOzZ/ktNuP88K7ET+MbXJffDYoKq8MVRC1rhy/eN639P/3M+dGSSXFC9iGHsOV4D KD1jji4L0g0/r27MisCvvZoz0hD5mwDDaThRI3ozch45p98pZXzds3w/OsKPJ1DdKveh gkIQ7LLOE2njs1MDp6XbEJlhTN/ut/0ur4u4A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=BJuHA++yZKUvXQYLREUo5jB4FWwHB72Oxef9bke/fBRminsOTVajgsoH7huIaXMyog rjmHMy3BELtT7It8sQq5LqoBmX2BrzbE7R0c9f0LawynvMPZvoxXoPVrcny1G4VvwFUg KP9lKob6N5JPmUuVgzod2w8Vi7AkiytMalnM0= Received: by 10.227.144.12 with SMTP id x12mr6023113wbu.102.1295969089094; Tue, 25 Jan 2011 07:24:49 -0800 (PST) Received: from [192.168.200.195] ([188.85.22.128]) by mx.google.com with ESMTPS id f35sm10191931wbf.14.2011.01.25.07.24.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 07:24:48 -0800 (PST) Message-ID: <4D3EEB3E.7070509@gmail.com> Date: Tue, 25 Jan 2011 16:24:46 +0100 From: Adelo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Control reached end of trigger procedure without RETURN References: <397A0940-896A-4DEF-873A-907976E8400B@adinf.es> <4D3E9764.8050904@adinf.es> <20377.1295968006@sss.pgh.pa.us> In-Reply-To: <20377.1295968006@sss.pgh.pa.us> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.589 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201101/79 X-Sequence-Number: 35026 El 25/01/2011 16:06, Tom Lane escribió: > 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 > Thanks for open my eyes. Great stupidity to mine. This is a second trigger that has no code and therefore there is no return. I feel the lost of time. Best regards.