Re: union of types in a different category

From: James Harper <james(dot)harper(at)bendigoit(dot)com(dot)au>
To: Brent Wood <Brent(dot)Wood(at)niwa(dot)co(dot)nz>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: union of types in a different category
Date: 2014-02-22 23:16:58
Message-ID: 6035A0D088A63A46850C3988ED045A4B6F3AFFA3@BITCOM1.int.sbss.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> I prefer the explicit approach used by Postgres - MYSQL is simpler, but I'd say
> simplistic in this area. While it can automate the cating of tpes/catories of
> variable, it doesn't always do it the way I want - so I need to be explicit
> anyway.
>
> In your second use case, which fails - do you want numerics cast to strings or
> vice versa? It can make difference, so to get what you want rather than
> otherwise, I prefer to be explicit. in either Postgres or MySQL.
>

Without anything explicit, I would want them cast to text (eg in the direction of the implicit cast for the types involved). The problem is that I don't necessarily have control of the queries - they were written for MSSQL.

James

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Janis Hamme 2014-02-23 00:49:42 Database creation: default permissions, owner of cloned elements
Previous Message James Harper 2014-02-22 23:14:43 Re: union of types in a different category