Recent Changes

Updates since 1970-01-01 00:00 UTC

(for 2019-08-26_PostgreSQL_–_COALESCE_and_NULLIF only)

1 | 3 | 7 | 30 | 90 days
List latest change per page only List only major changes
List later changes RSS RSS with pages RSS with pages and diff

2019-09-05

2019-08-26

  • 20:42 UTC (new) 2019-08-26 PostgreSQL – COALESCE and NULLIF . . . . Marcin Borkowski After the last week’s long post I decided that I needed some rest, so today I only have a short tip. It is a common need to say that we want the value of some variable x unless it is some kind of null value (depending on the language we use), in which case we want the value of some other variable y. The Lisp idiom for that is of course (or x y). In JavaScript, we usually say x || y, although this is risky if 0 is a valid value of x. (Hopefully, we will be able to say x ?? y in JS soon.) In my case, however, I needed this in SQL (more specifically, in PostgreSQL, but that doesn’t matter now).

More...

Filters