Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvWgb-0006JJ-87 for pgsql-sql@arkaria.postgresql.org; Wed, 16 Jan 2013 17:22:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TvWga-0003Bc-3E for pgsql-sql@arkaria.postgresql.org; Wed, 16 Jan 2013 17:22:00 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvWgG-0002v9-VJ for pgsql-sql@postgresql.org; Wed, 16 Jan 2013 17:21:41 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvWgF-00083T-7h for pgsql-sql@postgresql.org; Wed, 16 Jan 2013 17:21:40 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi1so906386pad.36 for ; Wed, 16 Jan 2013 09:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=RgkVuO9+9Iwx3OLsZhhVxHGMORm2ood8V7r3QNO4QsI=; b=NrF/SIT5PTai45b/ncpmUFA21fg5GppQi3zz1ccDXcdbTI3V4O9Jzeq6UmTSnIwq5u dWqebUO158S+jGV3DiiQmnTeBUH/WTSfOGBvwpbclf6bf2Ll3RMPhVcWU+FQU/6v+wAv IgNMCPWfCfPSE5DIUwRqiGZwKoc2WLTj3guOOP9a/0N7DYGE5WfHnD/LYa6JwSElp1dJ +tHaFfeJLL6TU2EOEDDEq2Qq4IaAYCsJM4k3wqK7dWeRxHUfOdVE4PTnD0XWJS9GxsNb z+oCtEhuRN4+dUbZZIVwIrHBKe93nkvElJlOpWgEVWJGSZSs8DOrS0ggNtEz7+0APX2g BVlA== X-Received: by 10.68.192.97 with SMTP id hf1mr4666086pbc.106.1358356898345; Wed, 16 Jan 2013 09:21:38 -0800 (PST) Received: from [192.168.200.187] ([199.48.193.159]) by mx.google.com with ESMTPS id vn2sm12617398pbc.31.2013.01.16.09.21.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jan 2013 09:21:37 -0800 (PST) Message-ID: <50F6E19F.20609@gmail.com> Date: Wed, 16 Jan 2013 09:21:35 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: James Sharrett CC: pgsql-sql@postgresql.org Subject: Re: returning the number of rows output by a copy command from a function References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 01/16/2013 09:16 AM, James Sharrett wrote: > The problem I have is that I get nothing back when the COPY is run inside > the function other than what I explicitly return from the function so I > don't have anything to parse. It's odd that the record count in the > function is treated differently than from sql query in GET DIAGNOSTIC > since the format and information in the string (when run outside of the > function) are exactly the same. > Execute strSQL into export_count; What is export_count DECLAREd as? -- Adrian Klaver adrian.klaver@gmail.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql