X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0C3B7D1C9D8 for ; Thu, 29 Jan 2004 18:43:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 55839-07 for ; Thu, 29 Jan 2004 14:42:33 -0400 (AST) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 2704ED1B80B for ; Thu, 29 Jan 2004 14:42:31 -0400 (AST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 4336626; Thu, 29 Jan 2004 10:43:34 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: Bill Moran , Shridhar Daithankar Subject: Re: On the performance of views Date: Thu, 29 Jan 2004 10:41:19 -0800 User-Agent: KMail/1.4.3 Cc: pgsql-performance@postgresql.org References: <40152FF2.8000007@potentialtech.com> <4017764B.3080903@frodo.hserus.net> <4017DD0D.6040200@potentialtech.com> In-Reply-To: <4017DD0D.6040200@potentialtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200401291041.19017.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/304 X-Sequence-Number: 5478 Shridhar, Bill, > > Is MSSQL allows to mix rows of two types in single function invocation, > > I am sure that would be a hell lot of porting trouble.. There's also the question of whether or not PG would every want to do this. Frankly, as a once-upon-a-time SQL Server application developer, I found the ability to return multiple rowsets from a single SQL Server procedure pretty useless, and a source of endless debugging if we tried to implement it. > 1) Returning a homogenious set of rows, but the composition of those rows > will not be known until run time, as a different set of logic will be > done depending on the values of some parameters. This can be done with Set Returning Functions. The issue is that the call to the function requires special syntax, and the program calling the function must know what columns are going to be returned at the time of the call. Hmmm, is that clear or confusing? > #2 has to be solved at the application level. My solution so far has > been to create multiple Postgres functions, call each one in turn, join > the results in C, and return them as a structure via SOAP to the client. > May not be the easiest way to get it working, but it's working so far. > (although I'm always open to suggestions if someone knows of a better > way) See my comment above. I frankly don't understand what the use of a non-homogenous recordset is. Can you explain? -- Josh Berkus Aglio Database Solutions San Francisco