pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Bertheau ☭ <twanger@bluetwanger.de>
To: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: 'PostgreSQL' <pgsql-sql@postgresql.org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: Fri, 03 Jun 2005 13:52:35 +0200
Message-ID: <1117799555.9816.24.camel@dicaprio.akademie1.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0506031420340.23350-100000@matrix.gatewaynet.com>
References: <Pine.LNX.4.44.0506031420340.23350-100000@matrix.gatewaynet.com>

В Птн, 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 ☭ <twanger@bluetwanger.de>




view thread (15+ messages)  latest in thread

Message-ID: <1117799555.9816.24.camel@dicaprio.akademie1.de>
Permalink:  ../1117799555.9816.24.camel@dicaprio.akademie1.de/
Also on:    postgresql.org/message-id/1117799555.9816.24.camel@dicaprio.akademie1.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: twanger@bluetwanger.de, achill@matrix.gatewaynet.com
  Subject: Re: 'true'::TEXT::BOOLEAN
  In-Reply-To: <1117799555.9816.24.camel@dicaprio.akademie1.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox