Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A8DFB6321ED; Tue, 6 Jan 2009 18:14:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65097-05; Tue, 6 Jan 2009 18:13:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from svana.org (svana.org [203.190.233.187]) by mail.postgresql.org (Postfix) with ESMTP id 6317C632186; Tue, 6 Jan 2009 18:13:55 -0400 (AST) Received: from kleptog by svana.org with local (Exim 4.63) (envelope-from ) id 1LKKBB-0008FN-2m; Wed, 07 Jan 2009 09:13:41 +1100 Date: Tue, 6 Jan 2009 23:13:41 +0100 From: Martijn van Oosterhout To: Gurjeet Singh Cc: Tom Lane , Pavel Stehule , PGSQL General , PGSQL Hackers Subject: Re: [HACKERS] ERROR: failed to find conversion function from "unknown" to text Message-ID: <20090106221340.GA25467@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Gurjeet Singh , Tom Lane , Pavel Stehule , PGSQL General , PGSQL Hackers References: <65937bea0901052223w162a977dyeaaf888a854f7324@mail.gmail.com> <162867790901052230l25b10f08qa35f56856b9cc4c6@mail.gmail.com> <65937bea0901052237j50657573i8c980f9f5f4814d5@mail.gmail.com> <162867790901052245l4e4fa9b2ydc03781b45b13276@mail.gmail.com> <65937bea0901060104n399cdec8ye5e2b8e247e5139a@mail.gmail.com> <7588.1231246899@sss.pgh.pa.us> <65937bea0901060538n13099005p62f05ef60ed352bd@mail.gmail.com> <8183.1231249686@sss.pgh.pa.us> <65937bea0901060943w52c5473ucee1a90f36842d4c@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <65937bea0901060943w52c5473ucee1a90f36842d4c@mail.gmail.com> X-PGP-Key-ID: Length=1024; ID=0x6F0B424C X-PGP-Key-Fingerprint: 34A8 8EAC F902 8C8D CA72 DCC7 201E DB34 6F0B 424C User-Agent: Mutt/1.5.13 (2006-08-11) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/115 X-Sequence-Number: 142200 --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 06, 2009 at 11:13:59PM +0530, Gurjeet Singh wrote: > If we consider the second branch of UNION ALL of both the queries above, = if > "select '' " yields a text column, then so should a "select * from (select > '')". The problem is ofcourse that "select ''" doesn't produce a text column in postgres. This generally works fine, except in the case of UNION where none of the branches provide the necessary type info. Have a nice day, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while=20 > boarding. Thank you for flying nlogn airlines. --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFJY9eUIB7bNG8LQkwRAoBKAJ9uSJAVS/sAZHOQfGZDz0a7YSgeZgCgj4jr gNB+eQ6s8Mz3TGihA95GOwA= =EVuu -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--