Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id AAC10133798E for ; Wed, 11 May 2011 15:27:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 03860-06 for ; Wed, 11 May 2011 18:27:42 +0000 (UTC) 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 6FFF21337BF3 for ; Wed, 11 May 2011 15:27:42 -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 p4BIRfoe003340; Wed, 11 May 2011 14:27:41 -0400 (EDT) To: Skylar Hawk cc: pgsql-bugs@postgreSQL.org Subject: Re: BUG #6020: Wrong data type returned after CAST in FROM In-reply-to: References: <201105102236.p4AMaW5e038211@wwwmaster.postgresql.org> <570.1305133499@sss.pgh.pa.us> <1750.1305135610@sss.pgh.pa.us> Comments: In-reply-to Skylar Hawk message dated "Wed, 11 May 2011 11:15:10 -0700" Date: Wed, 11 May 2011 14:27:41 -0400 Message-ID: <3339.1305138461@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/93 X-Sequence-Number: 30232 Skylar Hawk writes: > My apologies too. Now that I look at it I wasn't accurately describing > how I was doing things after all. In the script I do pass on the data > I get back from that query into another function, but after looking > again, it looks like I have the script pull the data from this query > and then push it into another query instead of having the database do > it. Sorry for the excess frustration it probably caused. Well, the main point here seems to be that you've got a function returning record, not just a scalar value which is what your initial example suggested. I've been able to duplicate the error and confirm that the behavior changed in 9.0, but have not yet tracked down why. More news as it develops ... regards, tom lane