Re: Function

From: "Sumita Biswas (sbiswas)" <sbiswas(at)cisco(dot)com>
To: "'Stephan Szabo'" <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Function
Date: 2004-02-16 08:12:01
Message-ID: 004d01c3f464$8ecf67d0$2a154d0a@apac.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks for the answer.
I have one more issue. How do I test a function that I wrote?
I was able to create a function called Proc_ConferenceSummary().
In SQL Server I used to run it through query analyzer by writing the
following command:
exec Proc_ConferenceSummary '12/1/2003','1/23/2004',1,1,0,5001

But I don't know how to do it in Postgresql.

Any help is appreciated.

Thanks,
Sumita

-----Original Message-----
From: Stephan Szabo [mailto:sszabo(at)megazone(dot)bigpanda(dot)com]
Sent: Monday, February 16, 2004 1:07 AM
To: Sumita Biswas (sbiswas)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Function

On Thu, 12 Feb 2004, Sumita Biswas (sbiswas) wrote:

> Hi All,
>
> This function of mine gives a Parse Error:
>
> CREATE or replace FUNCTION
> Proc_ConferenceSummary(date,date,int,int,int)
> RETURNS SETOF tbl_error_master AS
> '
> declare
> li_CallManagerId int;
> begin
> select * FROM tbl_error_master;
> end;
> '
> LANGUAGE SQL;

I think you want plpgsql as the language.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Denis 2004-02-16 08:57:54 Re: max timestamp
Previous Message Denis 2004-02-16 07:57:02 Re: ORDER BY TIMESTAMP_column ASC, NULL first