Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Sure you can. Make a SQL or PLPGSQL function that does the conversion >> you want and then create a cast using it.
> That probably won't help him much with "values(0)": If I remember the context of the original request, it wasn't about that anyway, but about dealing with an existing smallint column. > Is there a way to make the builtin int to bool cast implicit? I think you'd have to go and hack the pg_cast entry ... but that cast is new in 8.1 anyway, so it doesn't apply to Marc's problem (yet). If we want to make it cover that specific scenario, changing it to AS ASSIGNMENT would be sufficient; I don't think it needs to be IMPLICIT. (I generally find cross-type-category implicit casts to be dangerous.) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly