Re: [GENERAL] Concatenating NULL with JSONB value return NULL

2016-12-18 Thread Jong-won Choi
Thanks Tom, Melvin, and John! @John, I keep forgetting the semantic differences between my programming language and PostgreSQL. I will go for Tom's COALESCE than Melvin's, purely for less typing. Thanks again, all! - Jong-won On 19/12/16 11:46, Tom Lane wrote: Melvin Davidson writes:

Re: [GENERAL] Concatenating NULL with JSONB value return NULL

2016-12-18 Thread Tom Lane
Melvin Davidson writes: > On Sun, Dec 18, 2016 at 6:08 PM, John R Pierce wrote: >> On 12/18/2016 2:52 PM, Jong-won Choi wrote: >>> I have a NULL-able JSONB type column and want to perform upsert, >>> concatenating with the existing value. >> NULL does not mean 'NO' value in SQL it means UNKNOWN

Re: [GENERAL] Concatenating NULL with JSONB value return NULL

2016-12-18 Thread Melvin Davidson
On Sun, Dec 18, 2016 at 6:08 PM, John R Pierce wrote: > On 12/18/2016 2:52 PM, Jong-won Choi wrote: > >> >> I have a NULL-able JSONB type column and want to perform upsert, >> concatenating with the existing value. >> > > NULL does not mean 'NO' value in SQL it means UNKNOWN value. sort of like >

Re: [GENERAL] Concatenating NULL with JSONB value return NULL

2016-12-18 Thread John R Pierce
On 12/18/2016 2:52 PM, Jong-won Choi wrote: I have a NULL-able JSONB type column and want to perform upsert, concatenating with the existing value. NULL does not mean 'NO' value in SQL it means UNKNOWN value. sort of like the 'indeterminate' in math. maybe you want a NOT NULL json value t