Re: [GENERAL] Implementing DB2's "distinct" types

2013-04-29 Thread Thomas Kellerer
Simon Riggs, 28.04.2013 21:42: On 21 April 2013 12:17, Thomas Kellerer wrote: DB2 lets you define your own types (just as Postgres) but with the added benefit that you can mark them such that they are _not_ comparable, e.g. to avoid comparing "apples to oranges". Sounds like an interesting f

Re: [GENERAL] Implementing DB2's "distinct" types

2013-04-28 Thread Simon Riggs
On 21 April 2013 12:17, Thomas Kellerer wrote: > DB2 lets you define your own types (just as Postgres) but with the added > benefit that you can mark them such that they are _not_ comparable, e.g. to > avoid comparing "apples to oranges". Sounds like an interesting feature we might want, but you

Re: [GENERAL] Implementing DB2's "distinct" types

2013-04-22 Thread Darren Duncan
On 2013.04.22 12:09 AM, Thomas Kellerer wrote: create type sno as varchar(50) with comparisons; create type pno as varchar(50) with comparisons; The following query will be rejected because sno and pno are not comparable (even though both are varchar columns): select * from p jo

Re: [GENERAL] Implementing DB2's "distinct" types

2013-04-22 Thread Thomas Kellerer
create type sno as varchar(50) with comparisons; create type pno as varchar(50) with comparisons; The following query will be rejected because sno and pno are not comparable (even though both are varchar columns): select * from p join s on s.sno = p.pno; I wonder if a similar

Re: [GENERAL] Implementing DB2's "distinct" types

2013-04-21 Thread Atri Sharma
Sent from my iPad On 21-Apr-2013, at 16:47, Thomas Kellerer wrote: > Hi, > > I recently stumbled upon a really cool feature in DB2: distinct types. > > DB2 lets you define your own types (just as Postgres) but with the added > benefit that you can mark them such that they are _not_ comparab

[GENERAL] Implementing DB2's "distinct" types

2013-04-21 Thread Thomas Kellerer
Hi, I recently stumbled upon a really cool feature in DB2: distinct types. DB2 lets you define your own types (just as Postgres) but with the added benefit that you can mark them such that they are _not_ comparable, e.g. to avoid comparing "apples to oranges". Take the following example: cre