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 3C05F528BB for ; Fri, 3 Jun 2005 08:52:48 -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 28537-06 for ; Fri, 3 Jun 2005 11:52:43 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id 69DE0528A8 for ; Fri, 3 Jun 2005 08:52:40 -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 j53BqfT17053; Fri, 3 Jun 2005 13:52:41 +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 13:52:35 +0200 Message-Id: <1117799555.9816.24.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.022 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/37 X-Sequence-Number: 21638 В Птн, 03/06/2005 в 14:20 +0300, Achilleus Mantzios пишет: > O Markus Bertheau β^Ψ­ έγραψε στις Jun 3, 2005 : > > > Hi, > > > > What's the type I need to convert text to before I can convert it to > > boolean? > > just 't' will suffice. Well, that's not my question. I have a plpgsql function like that: CREATE FUNCTION object_new(class TEXT, properties TEXT[]) which I call like object_new('Car', ARRAY['color', 'red', 'new', 'true']) That means set color to red and new to true. In the function I need to call object_set_boolean_property(object_id INT, property_name TEXT, property_value BOOLEAN) And I can't call it with a TEXT variable, because casting from TEXT to BOOLEAN isn't possible. Markus -- Markus Bertheau ☭