Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2EF359FA318; Thu, 26 Oct 2006 11:13:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 87997-05; Thu, 26 Oct 2006 11:13:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from gmp-ea-fw-1.sun.com (gmp-ea-fw-1.sun.com [192.18.1.36]) by postgresql.org (Postfix) with ESMTP id F114A9FA217; Thu, 26 Oct 2006 11:13:22 -0300 (ADT) Received: from d1-emea-10.sun.com (d1-emea-10.sun.com [192.18.2.120] (may be forged)) by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k9QEDLtd012470; Thu, 26 Oct 2006 15:13:21 +0100 (BST) Received: from conversion-daemon.d1-emea-10.sun.com by d1-emea-10.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0J7Q00D01Y3JU200@d1-emea-10.sun.com> (original mail from Zdenek.Kotala@Sun.COM); Thu, 26 Oct 2006 15:13:21 +0100 (BST) Received: from [129.157.18.76] by d1-emea-10.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0J7Q00FBMY68SW1K@d1-emea-10.sun.com>; Thu, 26 Oct 2006 15:13:21 +0100 (BST) Date: Thu, 26 Oct 2006 16:11:27 +0200 From: Zdenek Kotala Subject: Re: [HACKERS] COPY does not work with regproc and aclitem In-reply-to: <20061026134406.GN9340@alvh.no-ip.org> To: Alvaro Herrera Cc: Tom Lane , pgsql-hackers@postgresql.org, pgsql-patches@postgresql.org Message-id: <4540C20F.8020900@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT References: <453D1B73.2050906@sun.com> <20061023200200.GD11409@alvh.no-ip.org> <27990.1161634170@sss.pgh.pa.us> <453E0A68.4070506@sun.com> <7995.1161697174@sss.pgh.pa.us> <4540B8B2.2070800@sun.com> <20061026134406.GN9340@alvh.no-ip.org> User-Agent: Thunderbird 1.5.0.5 (X11/20060911) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.036 tagged_above=0 required=5 tests=AWL, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200610/153 X-Sequence-Number: 21477 Alvaro Herrera napsal(a): > Zdenek Kotala wrote: >> Tom Lane napsal(a): >>> Zdenek Kotala writes: >>>> I prepared patch which use oid output function instead regproc output. >>>> This change works only for COPY TO command. >>> This is not a bug and we're not going to fix it, most especially not >>> like that. >> OK, The behavior of regproc type is described in the documentation, but >> if we don't fix it, than Some error message like "Regproc data type is >> not supported by COPY TO command" could be useful. Because you find that >> something is wrong when you want to restore data back and it should be >> too late. > > But it works as "expected". If the approach you suggest would be one we > would take, then it should emit the same error on SELECT as well, > shouldn't we? It is right. > I think the problem is that regproc COPY is not useful to you for your > particular use case. But there are workarounds, like the one I > suggested and you promptly ignored. Yes, I read your suggestion It is useful form me thanks for that. But I thought how to remove that regproc limitation or how to avoid some confusing. Current mention about regproc limitation/behavior in the documentation is really best solution. By the way, If I read carefully your suggestion, Tom's answer and documentation, correct solution (theoretical) is replace regproc by regprocedure datatype in the catalog, but there is problem in the boostrap phase? Thanks Zdenek