Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvWkj-0006Si-Mp for pgsql-sql@arkaria.postgresql.org; Wed, 16 Jan 2013 17:26:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TvWkj-0005NI-6j for pgsql-sql@arkaria.postgresql.org; Wed, 16 Jan 2013 17:26:17 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvWkh-0005MN-VM for pgsql-sql@postgresql.org; Wed, 16 Jan 2013 17:26:16 +0000 Received: from mail-ie0-f178.google.com ([209.85.223.178]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvWkg-000885-EC for pgsql-sql@postgresql.org; Wed, 16 Jan 2013 17:26:15 +0000 Received: by mail-ie0-f178.google.com with SMTP id c12so2956566ieb.37 for ; Wed, 16 Jan 2013 09:26:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:user-agent:date:subject:from:to:message-id:thread-topic :in-reply-to:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=UOB1IpX4xKelm3MouP0UrCe+woRJ385XxHQnKFkLJBE=; b=MIUizFS46rikj0JNRNsLriuMMVDBzIu63PrEGlIToWweWFo/4U9W+rU1JlgZ6D20il JuY1dT9JHRDoWhJCOJtV9IDWnHq5J0+/uWLmUL7vADFyLEZpqTeIAYqiWEckHonZfxkZ u1f6MO3SRYLNeTOUN97+XK7LzVMxhMTbrEQWvx1fLX3N2Q8/lyvilebNMpMIYXr7Yze1 1IeiJ3alro4AJjKZh93WyzIavuyWk40daSlnBqgsgOJ6ZF3xgvLdxlQHbJnHEywLuVDY BPO633jpwF86rpPxabgkHRppkdJnZcTBbiQaMFy2TQAJEY/I4ElJwoYcTIN7qUAyCEPu zxwQ== X-Received: by 10.50.187.230 with SMTP id fv6mr5372047igc.48.1358357173550; Wed, 16 Jan 2013 09:26:13 -0800 (PST) Received: from [192.168.1.22] (adsl-074-245-040-156.sip.clt.bellsouth.net. [74.245.40.156]) by mx.google.com with ESMTPS id xn10sm4800169igb.4.2013.01.16.09.26.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Jan 2013 09:26:12 -0800 (PST) User-Agent: Microsoft-MacOutlook/14.2.5.121010 Date: Wed, 16 Jan 2013 12:26:05 -0500 Subject: Re: returning the number of rows output by a copy command from a function From: James Sharrett To: Message-ID: Thread-Topic: [SQL] returning the number of rows output by a copy command from a function In-Reply-To: <50F6E19F.20609@gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Gm-Message-State: ALoCoQkeYmb1tc+eZm0JouoUGfNnfHNSmJ/qazFYkvWWRTYcUZgoUxvU6LXQiyHkDHBZTLMhMQlw 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 Integer On 1/16/13 12:21 PM, "Adrian Klaver" wrote: >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