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 8134DD1E167 for ; Sat, 21 Feb 2004 08:00:50 +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 95712-10 for ; Sat, 21 Feb 2004 04:00:42 -0400 (AST) Received: from ndl1mr1-a-fixed.sancharnet.in (ndl1mr1-a-fixed.sancharnet.in [61.0.0.45]) by svr1.postgresql.org (Postfix) with ESMTP id E8B63D1B4D2 for ; Sat, 21 Feb 2004 04:00:41 -0400 (AST) Received: from conversion-daemon.ndl1mr1-a-fixed.sancharnet.in by ndl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) id <0HTF00F01BUPBT@ndl1mr1-a-fixed.sancharnet.in> for pgsql-sql@postgresql.org; Sat, 21 Feb 2004 13:24:08 +0530 (IST) Received: from sancharnet.in ([61.0.95.118]) by ndl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) with ESMTPA id <0HTF004IZCM1VQ@ndl1mr1-a-fixed.sancharnet.in>; Sat, 21 Feb 2004 13:24:08 +0530 (IST) Date: Sat, 21 Feb 2004 13:42:22 +0530 From: "V i s h a l Kashyap @ [Sai Hertz And Control Systems]" Subject: Re: Function In-reply-to: <007e01c3f78d$ad346f50$2a154d0a@apac.cisco.com> To: Sumita Biswas Cc: pgsql-sql@postgresql.org Reply-To: aspire420@hotpop.com Message-id: <403712E6.3030501@sancharnet.in> Organization: Sai Hertz And Control Systems Pvt Ltd MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) References: <007e01c3f78d$ad346f50$2a154d0a@apac.cisco.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/327 X-Sequence-Number: 17017 Dear Sumita Biswas , >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. > > If this valriable is lv_flag and you are using plpgsql just declase lv_flag as boolean and point as this lv_flag := drop_table_if_exists(''alarmconfig'',false); I hope this helps -- Best Regards, Vishal Kashyap Director / Lead Developer, Sai Hertz And Control Systems Pvt Ltd, http://saihertz.rediffblogs.com Jabber IM: vishalkashyap@jabber.org ICQ : 264360076 ----------------------------------------------- You yourself, as much as anybody in the entire universe, deserve your love and affection. - Buddha --------------- I am usually called as Vishal Kashyap and my Girlfriend calls me Vishal CASH UP. Because everyone loves me as Vishal Kashyap and my Girlfriend loves me as CASH. ___ //\\\ ( 0_0 ) ----------------o0o-----o0o---------------------