Re: PL/PGSQL - How to pass in variables?

From: Jean-Paul Argudo <jean-paul(at)argudo(dot)org>
To: Scott Yohonn <syohonn(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: PL/PGSQL - How to pass in variables?
Date: 2006-05-14 18:50:21
Message-ID: 44677BED.7080803@argudo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message filippo2991 2006-05-14 21:40:49 insert related data into two tables
Previous Message Jaime Casanova 2006-05-14 16:16:58 Re: PL/PGSQL - How to pass in variables?