Re: PL/PGSQL - How to pass in variables? - Mailing list pgsql-sql

From Jean-Paul Argudo
Subject Re: PL/PGSQL - How to pass in variables?
Date
Msg-id 44677BED.7080803@argudo.org
Whole thread Raw
In response to PL/PGSQL - How to pass in variables?  ("Scott Yohonn" <syohonn@gmail.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: PL/PGSQL - How to pass in variables?
Next
From: Emi Lu
Date:
Subject: Re: Find min and max values across two columns?