Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B269265050F for ; Thu, 10 Jul 2008 09:10:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91043-10 for ; Thu, 10 Jul 2008 09:10:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by postgresql.org (Postfix) with ESMTP id 06859650320 for ; Thu, 10 Jul 2008 09:10:41 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id e30so2008360fke.3 for ; Thu, 10 Jul 2008 05:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=1bYpT/QSjY9P0WBgoumEBDPOsAispO7HHz67yAcLco8=; b=H514n4cpezVcGnhcMOfz0sHkJBIZh7YnWLiNuBFDi7Q221ypSYt/acjZj66zNNpovd gj2TK32YEygCAxeRXT/wbeOyhebRsBY3Nj+xlrUPqebJjIjwqQA5/BTY/EDfK9geMTUS 6DTKWeUcyjGCrIY4Y3kVrgmIz8HDf+UiVl0PE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=JqHAMLNcp1TmmVVF6ekcena0jXaUkOJ0LU+nOdywoSQozoqXgmjH5j5ycyNLZ98hkB 9xjl81XRc4jGf3zxYdaqVhnEOmr2qfIQiOM7t3W7Hv+7nkQla7mH7sZeshfL6fdDuHK2 OWZWOIxlmSdQBGqpgGg+n+5x7hnvKuKCmNkhE= Received: by 10.125.110.15 with SMTP id n15mr2521425mkm.165.1215691839097; Thu, 10 Jul 2008 05:10:39 -0700 (PDT) Received: by 10.125.47.2 with HTTP; Thu, 10 Jul 2008 05:10:39 -0700 (PDT) Message-ID: Date: Thu, 10 Jul 2008 15:10:39 +0300 From: "Marko Kreen" To: "Pavel Stehule" Subject: Re: review: table function support Cc: pgsql-patches In-Reply-To: <162867790807100158j6461ee76g639367c0547ec3bf@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5568_31932558.1215691839082" References: <162867790807090838k1265ff70r1f312b26e7c4fefa@mail.gmail.com> <162867790807100158j6461ee76g639367c0547ec3bf@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/126 X-Sequence-Number: 6820 ------=_Part_5568_31932558.1215691839082 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/10/08, Pavel Stehule wrote: > I am sending actualized patch > > Regards > Pavel Stehule > > 2008/7/9 Pavel Stehule : > > > 2008/7/9 Marko Kreen : > >> Generally, the patch looks fine. There are few issues still: > >> > >> - plpgsql: the result columns _do_ create local variables. > >> AIUI, they should not? > > > > it was my mistake - it doesn't do local variables - fixed > >> > >> - pg_dump: is the psql_assert() introduction necessary, considering it > >> is used only in one place? > > > > removed - argmode variables is checked before > >> > >> - There should be regression test for plpgsql too, that test if > >> the behaviour is correct. > >> > > > > addeded > >> - The documentation should mention behaviour difference from OUT > >> parameters. > > > > I will do it. > >> > >> Wishlist (probably out of scope for this patch): > > > > this is in my wishlist too, but postgresql doesn't support types like > > result of functions. > >> > >> - plpgsql: a way to create record variable for result row. Something like: > >> > >> CREATE FUNCTION foo(..) RETURNS TABLE (..) AS $$ > >> DECLARE > >> retval foo%ROWTYPE; > >> > >> > >> Currently the OUT parameters are quite painful to use due to bad > >> name resolving logic. Such feature would be perfect replacement. > >> > >> -- > >> marko > >> > > I'll send patch early, thank you much Ok, last items: - Attached is a patch that fixes couple C comments. - I think plpgsql 38.1.2 chapter of "Supported Argument and Result Data Types" should also have a mention of TABLE functions. Then I'm content with the patch. -- marko ------=_Part_5568_31932558.1215691839082 Content-Type: text/x-patch; name=tbl.comments.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fihbhxaa Content-Disposition: attachment; filename=tbl.comments.diff ZGlmZiAtLWdpdCBhL3NyYy9iaW4vcGdfZHVtcC9wZ19kdW1wLmMgYi9zcmMvYmluL3BnX2R1bXAv cGdfZHVtcC5jCmluZGV4IDNmOTBjOTMuLjZhZTQ1MjEgMTAwNjQ0Ci0tLSBhL3NyYy9iaW4vcGdf ZHVtcC9wZ19kdW1wLmMKKysrIGIvc3JjL2Jpbi9wZ19kdW1wL3BnX2R1bXAuYwpAQCAtNjg0Nyw3 ICs2ODQ3LDcgQEAgZHVtcEZ1bmMoQXJjaGl2ZSAqZm91dCwgRnVuY0luZm8gKmZpbmZvKQogCiAJ YXBwZW5kUFFFeHBCdWZmZXIocSwgIkNSRUFURSBGVU5DVElPTiAlcyAiLCBmdW5jc2lnKTsKIAot CS8qIHN3aWNoIGJldHdlZW4gUkVUVVJOUyBTRVRPRiBSRUNPUkQgYW5kIFJFVFVSTlMgVEFCTEUg ZnVuY3Rpb25zICovCisJLyogc3dpdGNoIGJldHdlZW4gUkVUVVJOUyBTRVRPRiBSRUNPUkQgYW5k IFJFVFVSTlMgVEFCTEUgZnVuY3Rpb25zICovCiAJaWYgKCFpc19yZXR1cm5zX3RhYmxlX2Z1bmN0 aW9uKG5hbGxhcmdzLCBhcmdtb2RlcykpCiAJewogCQlyZXR0eXBlbmFtZSA9IGdldEZvcm1hdHRl ZFR5cGVOYW1lKGZpbmZvLT5wcm9yZXR0eXBlLCB6ZXJvQXNPcGFxdWUpOwpkaWZmIC0tZ2l0IGEv c3JjL3BsL3BscGdzcWwvc3JjL3BsX2NvbXAuYyBiL3NyYy9wbC9wbHBnc3FsL3NyYy9wbF9jb21w LmMKaW5kZXggNjEyYTg0Zi4uYzY4M2FlYSAxMDA2NDQKLS0tIGEvc3JjL3BsL3BscGdzcWwvc3Jj L3BsX2NvbXAuYworKysgYi9zcmMvcGwvcGxwZ3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