> > feature of that type. But random misfeatures such as the join syntax or > > the decode() function are going to have a hard time getting accepted. > > But we have decode(): > > test=> \df decode > List of functions > Result data type | Schema | Name | Argument data types > ------------------+------------+--------+--------------------- > bytea | pg_catalog | decode | text, text > (1 row) > > Is this a different decode?
Yes this is completly different. Oracle decode works like this: decode(value, choice1, result1, choice 2, result2, ......, default_result) it works this way: case when value=choice1 then result1 when value=choice2 then result2 .... else default_result end The nice part is it has an varying number of arguments, and can used within "sort". Very useful sometimes. Another one very useful oracle function is "nvl", the same like "coalesce", but a lot easier to write :-) ---------------------------(end of broadcast)--------------------------- TIP 3: 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