X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 328A19F9C18 for ; Sun, 14 May 2006 15:51:25 -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 16872-04 for ; Sun, 14 May 2006 15:51:18 -0300 (ADT) X-Greylist: delayed 03:05:31.092376 by SQLgrey- Received: from achille.dalibo.net (achille.dalibo.net [212.85.153.230]) by postgresql.org (Postfix) with ESMTP id 8D3CB9F944D for ; Sun, 14 May 2006 15:51:18 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by achille.dalibo.net (Postfix) with ESMTP id 0C0BA15F68; Sun, 14 May 2006 20:38:59 +0200 (CEST) Received: from achille.dalibo.net ([127.0.0.1]) by localhost (achille [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20024-09; Sun, 14 May 2006 20:38:58 +0200 (CEST) Received: from [192.168.0.1] (maison.argudo.org [81.56.190.65]) by achille.dalibo.net (Postfix) with ESMTP id BAD0115F5E; Sun, 14 May 2006 20:38:55 +0200 (CEST) Message-ID: <44677BED.7080803@argudo.org> Date: Sun, 14 May 2006 20:50:21 +0200 From: Jean-Paul Argudo User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: Scott Yohonn Cc: pgsql-sql@postgresql.org Subject: Re: PL/PGSQL - How to pass in variables? References: <44675072.8030104@argudo.org> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at dalibo.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/108 X-Sequence-Number: 25139 Scott Yohonn wrote: > Jean-Paul, > > Thanks! This did work. The output put the name of the function > (get_table_count) as the header. How would I display the name of the table > that I am requesting the row count of? The only way I know is to alias the output in the query calling the function, so: select get_table_count('bar') as bar; bar ----- 3 (1 row) I don't know any other way to do that... Cheers, -- Jean-Paul Argudo www.PostgreSQLFr.org www.dalibo.com