X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AACABD1DD51 for ; Mon, 16 Feb 2004 08:12:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 24523-06 for ; Mon, 16 Feb 2004 04:12:09 -0400 (AST) Received: from ind-iport-1.cisco.com (ind-iport-1-sec.cisco.com [64.104.129.9]) by svr1.postgresql.org (Postfix) with ESMTP id DFBC7D1DA3E for ; Mon, 16 Feb 2004 04:12:06 -0400 (AST) Received: from india-core-1.cisco.com (64.104.129.221) by ind-iport-1.cisco.com with ESMTP; 16 Feb 2004 19:15:17 +0530 Received: from cisco.com (charminar.cisco.com [192.135.240.11]) by india-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id i1G8BtWT007274; Mon, 16 Feb 2004 00:11:55 -0800 (PST) Received: from sbiswasw2k01 (dhcp-10-77-21-42.cisco.com [10.77.21.42]) by cisco.com (8.8.8-Cisco List Logging/8.8.8) with ESMTP id NAA09432; Mon, 16 Feb 2004 13:40:11 +0530 (IST) Reply-To: From: "Sumita Biswas (sbiswas)" To: "'Stephan Szabo'" Cc: Subject: Re: Function Date: Mon, 16 Feb 2004 13:42:01 +0530 Organization: cisco systems Message-ID: <004d01c3f464$8ecf67d0$2a154d0a@apac.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Importance: Normal In-Reply-To: <20040215113632.Y88869@megazone.bigpanda.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/221 X-Sequence-Number: 16911 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@megazone.bigpanda.com] Sent: Monday, February 16, 2004 1:07 AM To: Sumita Biswas (sbiswas) Cc: pgsql-sql@postgresql.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.