Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 6FCC4633519; Tue, 17 Mar 2009 09:43:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 91517-07; Tue, 17 Mar 2009 09:43:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E9D0D632246; Tue, 17 Mar 2009 09:43:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2HCh6lT006996; Tue, 17 Mar 2009 08:43:06 -0400 (EDT) To: c k cc: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] different results for large objects In-reply-to: References: Comments: In-reply-to c k message dated "Tue, 17 Mar 2009 17:26:44 +0530" Date: Tue, 17 Mar 2009 08:43:05 -0400 Message-ID: <6995.1237293785@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL=0.013 X-Spam-Level: X-Archive-Number: 200903/185 X-Sequence-Number: 31685 c k writes: > I am getting correct results with following query i.e. binary objects as > they are inserted. > select docimages.* from docimages where docimages.accobjecttype=9 ORDER BY > docimages.docimagename; > but when I created a function as follows, binary objects are not shown, There is no server-side behavior that would cause that query to show you a large object's contents instead of its identifying number. I suppose that you have some client-side code that does something magic when it sees a result column of type "lo", and that for some reason this code is not successfully recognizing the case where the column is coming out of a function. Since you've shown us neither the troublesome query nor the client-side code, it's hard to speculate further than that. regards, tom lane