Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AA5FA4758FE for ; Fri, 2 Aug 2002 10:14:22 -0400 (EDT) Received: from mail-relay.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id AB685476188 for ; Fri, 2 Aug 2002 10:14:13 -0400 (EDT) Received: (qmail 23273 invoked from network); 2 Aug 2002 14:03:36 -0000 Received: from system67.trade-india-local.com (192.168.0.67) by infocom-236-129-del.trade-india.com with SMTP; 2 Aug 2002 14:03:36 -0000 Content-Type: text/plain; charset="us-ascii" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: pgsql-sql@postgresql.org Subject: possible bug in \df+ Date: Fri, 2 Aug 2002 19:47:28 +0530 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208021947.28780.mallah@trade-india.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/37 X-Sequence-Number: 8883 Hi there , " SELECT prosrc from pg_proc where proname=3D''; " and=20 \df+ are reporting two different versions for FUNCTION body. eg: \df+ category_path shows: DECLARE v_category_id ALIAS FOR $1; DECLARE tmp_record RECORD; DECLARE tmp_id VARCHAR; DECLARE tmp_code VARCHAR; BEGIN tmp_code :=3D '' ; SELECT INTO tmp_record b.name , a.category_id , a.parent_category_i= d from category_tree_new a natural inner join categories_new b where category_id=3Dv_category_id and a.link is n= ot true ; IF NOT FOUND THEN RETURN 'Home'; END IF; IF tmp_record.category_id =3D 0 THEN RETURN tmp_record.name; END IF; tmp_id :=3D category_path_text(tmp_record.parent_category_id) ; IF tmp_record.category_id <> 0 THEN tmp_code :=3D tmp_id || ' > ' || tmp_record.name ; END IF; RETURN tmp_code; END; and select from pg_proc gives DECLARE v_category_id ALIAS FOR $1; DECLARE tmp_record RECORD; DECLARE tmp_id VARCHAR; DECLARE tmp_code VARCHAR; BEGIN tmp_code :=3D '' ; SELECT INTO tmp_record b.name , a.category_id , a.parent_category_i= d from category_tree_new a natural inner join categories_new b where categ= ory_id=3Dv_category_id and a.link is not true ; IF NOT FOUND THEN RETURN '0' || ':' || 'ROOT'; END IF; IF tmp_record.category_id =3D 0 THEN RETURN tmp_record.category_id || ':' || tmp_record.name ; END IF; tmp_id :=3D category_path(tmp_record.parent_category_id) ; IF tmp_record.category_id <> 0 THEN tmp_code :=3D tmp_id || '#' || tmp_record.category_id || = ':' || tmp_record.name ; END IF; RETURN tmp_code; END; regds mallah. --=20 Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.