X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5A4EE52820 for ; Fri, 3 Jun 2005 09:04:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38314-01 for ; Fri, 3 Jun 2005 12:04:04 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id D525A5280A for ; Fri, 3 Jun 2005 09:04:03 -0300 (ADT) Received: from dicaprio.akademie1.de (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id j53C44T18477; Fri, 3 Jun 2005 14:04:04 +0200 Subject: Re: 'true'::TEXT::BOOLEAN From: Markus Bertheau =?UTF-8?Q?=E2=98=AD?= To: Achilleus Mantzios Cc: "'PostgreSQL'" In-Reply-To: References: Content-Type: text/plain; charset=utf-8 Date: Fri, 03 Jun 2005 14:03:58 +0200 Message-Id: <1117800238.9816.26.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/39 X-Sequence-Number: 21640 В Птн, 03/06/2005 в 14:45 +0300, Achilleus Mantzios пишет: > Then use the > case when ... then ... when ... then ... else ... end > construct, e.g. > case when mytext='true' then 't'::boolean else 'f'::boolean end Because I don't want to reimplement postgres' boolean parsing. > Hmm, why dont you leave it as 'true' or 'false' without any castings. Because then pg doesn't find the function because it looks for one with a text argument. Markus -- Markus Bertheau ☭