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 83C4ED1E166 for ; Fri, 20 Feb 2004 08:44:04 +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 85709-08 for ; Fri, 20 Feb 2004 04:44:02 -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 77740D1E0F1 for ; Fri, 20 Feb 2004 04:43:59 -0400 (AST) Received: from india-core-1.cisco.com (64.104.129.221) by ind-iport-1.cisco.com with ESMTP; 20 Feb 2004 19:48:03 +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 i1K8hoWT027766; Fri, 20 Feb 2004 00:43:50 -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 OAA01829; Fri, 20 Feb 2004 14:12:02 +0530 (IST) From: "Sumita Biswas" To: "'scott.marlowe'" Cc: "'Stephan Szabo'" , Subject: Re: Function Date: Fri, 20 Feb 2004 14:13:55 +0530 Message-ID: <007e01c3f78d$ad346f50$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 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/320 X-Sequence-Number: 17010 I have a postgres function that returns a boolean, I want to use this return in another function. How do I do it? Will the following code help me fetch it in a variable: select lv_flag = drop_table_if_exists(''alarmconfig'',false); drop_table_if_exists is the function which I want to call. Any help is appreciated. Thanks, Sumita -----Original Message----- From: scott.marlowe [mailto:scott.marlowe@ihs.com] Sent: Wednesday, February 18, 2004 4:17 AM To: Sumita Biswas (sbiswas) Cc: 'Stephan Szabo'; pgsql-sql@postgresql.org Subject: Re: [SQL] Function On Mon, 16 Feb 2004, Sumita Biswas (sbiswas) wrote: > 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. select functioname(arg1,arg2,arg3);