convert integer to bool implicitly

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: convert integer to bool implicitly
Date: 2005-12-18 18:39:55
Message-ID: do4ag4$1rsm$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How easy would it be to write a small type extension to have integer
automatically convert to bool?
For example, I want an implicit conversion that 0 is false and
everything else is true.

Is this C programming or can you do it with a local procedural language?

Thanks
Sim

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2005-12-18 18:58:15 Re: convert integer to bool implicitly
Previous Message David Ang 2005-12-18 18:25:19 installing tsearch 2 error no user "root"