Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 03D4D2E0059 for ; Fri, 9 May 2008 03:24:19 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 88591-09 for ; Fri, 9 May 2008 03:24:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.69]) by developer.postgresql.org (Postfix) with ESMTP id B0D2C2E0057 for ; Fri, 9 May 2008 03:24:13 -0300 (ADT) Received: from mac.com (asmtp002-s [10.150.69.65]) by smtpoutm.mac.com (Xserve/smtpout006/MantshX 4.0) with ESMTP id m496ODVi003939 for ; Thu, 8 May 2008 23:24:13 -0700 (PDT) Received: from [192.168.1.54] (88-149-177-167.static.ngi.it [88.149.177.167]) (authenticated bits=0) by mac.com (Xserve/asmtp002/MantshX 4.0) with ESMTP id m496O96Y009388 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 8 May 2008 23:24:11 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <4822D2E6.2090004@nsoft.lt> References: <4822D2E6.2090004@nsoft.lt> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1EB0E569-C6E4-462C-9B93-0C178CAFA19F@mac.com> Content-Transfer-Encoding: 7bit From: Giorgio Valoti Subject: Re: [Fwd: performance: view or function?] Date: Fri, 9 May 2008 08:23:30 +0200 To: pgsql-admin@postgresql.org X-Mailer: Apple Mail (2.753) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/66 X-Sequence-Number: 29150 On 08/mag/08, at 12:16, Julius Tuskenis wrote: > Hello, > > I have one question - what is the difference between the view and a > function returning a data set? I mean the performance. Which is > better to use? If its the same, I would use functions, because I > could use other languages not just SQL to get the results I want. > Take a look at this thread: Hope this helps -- Giorgio Valoti