Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gL1Bs-0005Mw-1H for pgsql-admin@arkaria.postgresql.org; Fri, 09 Nov 2018 07:26:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gL1Bp-0008RP-WC for pgsql-admin@arkaria.postgresql.org; Fri, 09 Nov 2018 07:26:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gL1Bp-0008RI-Nu for pgsql-admin@lists.postgresql.org; Fri, 09 Nov 2018 07:26:49 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gL1Bn-0006wE-0r for pgsql-admin@postgresql.org; Fri, 09 Nov 2018 07:26:49 +0000 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id B54B548E77; Fri, 9 Nov 2018 08:26:44 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id RhZeORLJNa7W; Fri, 9 Nov 2018 08:26:42 +0100 (CET) Message-ID: Subject: Re: %rowtype From: Laurenz Albe To: Pepe TD Vo , Pgsql-admin Date: Fri, 09 Nov 2018 08:26:40 +0100 In-Reply-To: <1769600488.1326361.1541732091653@mail.yahoo.com> References: <1769600488.1326361.1541732091653.ref@mail.yahoo.com> <1769600488.1326361.1541732091653@mail.yahoo.com> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pepe TD Vo wrote: > Would you please tell me what I did wrong here? > I couldn't find the rowtype eliminate with a cursor in multi-tables selected. > > > CREATE OR REPLACE FUNCTION "CIDR_STAGING"."PR_MIG_STG_I864" ( v_Ret OUT int ) RETURNS integer as $$ > declare > c1 cursor is > SELECT ...; > rec1 c1%rowtype; There is a type associated with each view and table, but not with a cursor. You need to use the generic type "record" for "rec1". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com