Re: [GENERAL] About the MONEY type

2016-12-18 Thread Gavin Flower
On 19/12/16 14:17, Rob Sargent wrote: On Dec 18, 2016, at 5:23 PM, Gavin Flower wrote: On 18/12/16 12:25, Bruce Momjian wrote: On Wed, Nov 30, 2016 at 01:35:12PM -0800, John R Pierce wrote: note, btw, TIMESTAMP WITH TIME ZONE doesn't actually store the timezone... rather, it converts it to an

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] About the MONEY type

2016-12-18 Thread Rob Sargent
> On Dec 18, 2016, at 5:23 PM, Gavin Flower > wrote: > > On 18/12/16 12:25, Bruce Momjian wrote: >> On Wed, Nov 30, 2016 at 01:35:12PM -0800, John R Pierce wrote: >>> note, btw, TIMESTAMP WITH TIME ZONE doesn't actually store the timezone... >>> rather, it converts it to an internal representat

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] About the MONEY type

2016-12-18 Thread Gavin Flower
On 18/12/16 12:25, Bruce Momjian wrote: On Wed, Nov 30, 2016 at 01:35:12PM -0800, John R Pierce wrote: note, btw, TIMESTAMP WITH TIME ZONE doesn't actually store the timezone... rather, it converts it to an internal representation of GMT, and then converts it back to display time at the client's

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

[GENERAL] Concatenating NULL with JSONB value return NULL

2016-12-18 Thread Jong-won Choi
PostgreSQL 9.6.1 Hi I have a NULL-able JSONB type column and want to perform upsert, concatenating with the existing value. The query looks like (campaigns and facts columns are JSONB type, in the below) : INSERT INTO Fan (oid, campaigns, facts) VALUES (189,'{"campaign-id": "12345"}','{

[GENERAL] streaming replication protocol in Perl?

2016-12-18 Thread Torsten Förtsch
Hi, is there a perl module that allows to speak the streaming replication protocol? Can DBD::Pg do that anyhow? I think I could just pipe from pg_recvlogical. But would be cool to have it directly in Perl. Thanks, Torsten