Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPgeJ-0005gN-2c for pgsql-admin@arkaria.postgresql.org; Tue, 06 Oct 2020 06:40:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPgeI-0003XR-2I for pgsql-admin@arkaria.postgresql.org; Tue, 06 Oct 2020 06:40:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPgeH-0003XK-PL for pgsql-admin@lists.postgresql.org; Tue, 06 Oct 2020 06:40:33 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kPgeA-0004hj-6b for pgsql-admin@postgresql.org; Tue, 06 Oct 2020 06:40:33 +0000 Received: by mail-wr1-x444.google.com with SMTP id e18so6182472wrw.9 for ; Mon, 05 Oct 2020 23:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3IlCYRn411CybdFiZEjPJEpGeKk9gG1epNfYrmYFyjM=; b=k+PJvhvLdsTVapzBzUQ3Ou7Q2FxIXNFFHdWn6/2isJKiFQHRcOW+Bwtv7EvAiYPMuF FEnqs5bCVVDON/pDCRf+7Kf1ML662PJ0yxLnA4EdsUcRDFJ3LYvLklEAuVakNfVHnLdn ecghuSZ532x4eWpRbVAWtCn2BExvrIEC+iNOOiXbnkc92RRSXGveQxIVqInQG3QVmB/5 d6kaZ3TqmyVvBSBcoM538/N2EYviho+KzAdf4/RYN76aM/LwF5M+PJ41X18Uovzw22jv 0xPDvZ+AtNl/hXwLMB7I/sYvTl1HZlnzFYJ4UDmT+z6F/bBT62dFEmdCoZI5942m4eH0 2dlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3IlCYRn411CybdFiZEjPJEpGeKk9gG1epNfYrmYFyjM=; b=eUoarNc7oDlHr06WI84ZSuHxdWCMV1AnKKaBshDA1KxbMyBo3k6hmFFa9vSV6U/CsX WfYzmWUrimgrTvECcA1QC2eyzYsvgcf8jVh7YJczgLLjQv9ja023d9hGUXwQ3jHZGg8I bSdfZC+aP3rd/ChKSFrnaQQHEYsfqRK9AQJxadNeSb+B3aPKmYdklTpEpTYmPuivtPPM UKNUQFtWdjzTcz3HZzaTfWnY2FzCbfB7+B2GvF4j8iID0F7P1aGZIrnKU/My0LUbRrLK bD83kk5E5lUXQs5phETHsMBTIkdW4b19sf3bDmUqdtpR6j4OJj1hHLQhYeT1ZCtMLm1/ y1Fw== X-Gm-Message-State: AOAM530wp+X1aPYcjE8hFjMLC7DNSgMiN6bBSQDLDdikNFXYzdlkXQzE WbO2/reiZJK2SYMOUSXSxP0= X-Google-Smtp-Source: ABdhPJx+W7rVDyA/HR2Ajw6PxijESvDpfPldu38AOKHPoQLBobu2+nd878Mu8gfWfR1pdtASiTNL0w== X-Received: by 2002:a5d:4682:: with SMTP id u2mr3322795wrq.254.1601966425441; Mon, 05 Oct 2020 23:40:25 -0700 (PDT) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id f189sm2548187wmf.16.2020.10.05.23.40.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2020 23:40:25 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: How to return multiple rows by stored procedure in postgresql From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: Date: Tue, 6 Oct 2020 08:40:20 +0200 Cc: androxkentaki , pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: <39B3366A-5C16-4477-9C5C-03D3689179CB@gmail.com> References: To: Naveen Kumar X-Mailer: Apple Mail (2.3608.120.23.2.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Naveen, > On 06. Oct, 2020, at 08:15, Naveen Kumar wrote: >=20 > Thank you for the quick response. >=20 > All the examples are talking about functions, not about procedures in = PostgreSQL. what i am looking for is how to return multiple rows by = calling STORED PROCEDURE in postgreSQL 12 version. >=20 > Thank you > Naveen a procedure does by definition not return anything. If you want to = return something, use a function. As for returning multiple rows, use create function ... returns table = (columns...) https://www.postgresql.org/docs/current/sql-createfunction.html https://www.postgresql.org/docs/current/sql-createprocedure.html Cheers, Paul=