pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc G. Fournier <scrappy@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: ALTER TABLE ( smallinto -> boolean ) ...
Date: Thu, 01 Sep 2005 16:56:45 -0400
Message-ID: <6399.1125608205@sss.pgh.pa.us> (raw)
In-Reply-To: <20050901174341.N1044@ganymede.hub.org>
References: <20050829201253.X1044@ganymede.hub.org>
	<15013.1125359379@sss.pgh.pa.us>
	<20050901174341.N1044@ganymede.hub.org>

"Marc G. Fournier" <scrappy@postgresql.org> writes:
> On Mon, 29 Aug 2005, Tom Lane wrote:
>> No, because there's no built-in cast from smallint to bool.

> 'k, I just took a read through the "CREATE CAST" man page, and don't think 
> I can use that for this,

Sure you can.  Make a SQL or PLPGSQL function that does the conversion
you want and then create a cast using it.

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <6399.1125608205@sss.pgh.pa.us>
Permalink:  ../6399.1125608205@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6399.1125608205@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, scrappy@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: ALTER TABLE ( smallinto -> boolean ) ...
  In-Reply-To: <6399.1125608205@sss.pgh.pa.us>

* 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