Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5DBFF1337B79 for ; Sun, 19 Sep 2010 20:59:11 -0300 (ADT) 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 23575-03 for ; Sun, 19 Sep 2010 23:59:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9EAC11336DB6 for ; Sun, 19 Sep 2010 20:59:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o8JNwwOl013672; Sun, 19 Sep 2010 19:58:58 -0400 (EDT) To: =?UTF-8?B?SmFubiBSw7ZkZXI=?= cc: pgsql-sql@postgresql.org Subject: Re: Table returning functions In-reply-to: References: Comments: In-reply-to =?UTF-8?B?SmFubiBSw7ZkZXI=?= message dated "Mon, 20 Sep 2010 01:04:07 +0200" Date: Sun, 19 Sep 2010 19:58:58 -0400 Message-ID: <13671.1284940738@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/52 X-Sequence-Number: 34583 =?UTF-8?B?SmFubiBSw7ZkZXI=?= writes: > Ok I now know that it really seems to do what I expected. But I still > wonder what it does if I use two functions f() and g() that return a > different number of rows. You get the least common multiple of their periods. It's ugly, and the lack of any very sane way to define the behavior is the main argument for deprecating SRFs in the targetlist. regards, tom lane