Re: [GENERAL] Optimize Query

2016-02-13 Thread drum.lu...@gmail.com
Anyone can help with that please? Cheers On Thursday, 11 February 2016, drum.lu...@gmail.com wrote: > oh ok! > > thanks > > > > Lucas Possamai > > - kinghost.co.nz > > - DigitalOcean

Re: [GENERAL] Test CMake build

2016-02-13 Thread Yury Zhuravlev
Andy Colson wrote: cmake and make -j2 fine, but then You can try again I removed some features from CMake 3.x . Realy big thanks for testing! -- Yury Zhuravlev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-general mailing list (pgsql-gene

[GENERAL] Custom conflict handlers

2016-02-13 Thread Nikhil
Hello, Is there any documentation with details of how to custom conflict handlers? Wanted to write update-update conflict handler. Any help is highly appreciated. Best Regards, Nikhil

Re: [GENERAL] Test CMake build

2016-02-13 Thread Andy Colson
On 02/13/2016 04:33 AM, Yury Zhuravlev wrote: Andy Colson wrote: cmake and make -j2 fine, but then You can try again I removed some features from CMake 3.x . Realy big thanks for testing! My pleasure. Still didn't work. 'make check' seems to make it through make install first, but then

Re: [GENERAL] Custom conflict handlers

2016-02-13 Thread Nikhil
This is for system that use BDR (Bi-Directional Replication). BDR documentation http://bdr-project.org/docs/next/functions-conflict-handlers.html talks about postgresql functions. I am looking for samples. Best Regards, Nikhil On Sat, Feb 13, 2016 at 5:31 PM, Nikhil wrote: > Hello, > > Is there

Re: [GENERAL] Test CMake build

2016-02-13 Thread Yury Zhuravlev
Andy Colson wrote: Still didn't work. 'make check' seems to make it through make install first, but then same sort of error: Now it looks like I can do "make check" only cmake 3.x (I will try to solve it later). But "make installcheck" with DESTDIR should work. I now have no close system wit

[GENERAL] Question on how to use to_timestamp()

2016-02-13 Thread Deven Phillips
I'm trying to convert a series of ISO8601 strings into TIMESTAMPs for use with a function: CREATE OR REPLACE FUNCTION v1_nexus_vlan_count(id TEXT, start_time TIMESTAMP, end_time TIMESTAMP) RETURNS TEXT AS $$ SELECT jsonb_pretty(jsonb_agg(row_to_json(datapoints))) AS data_array FROM ( SELECT da

Re: [GENERAL] Question on how to use to_timestamp()

2016-02-13 Thread Adrian Klaver
On 02/13/2016 07:42 PM, Deven Phillips wrote: > I'm trying to convert a series of ISO8601 strings into TIMESTAMPs for > use with a function: > > CREATE OR REPLACE FUNCTION v1_nexus_vlan_count(id TEXT, start_time > TIMESTAMP, end_time TIMESTAMP) > RETURNS TEXT AS $$ > SELECT jsonb_pretty(jsonb_ag

Re: [GENERAL] Question on how to use to_timestamp()

2016-02-13 Thread Vitaly Burovoy
On 2/13/16, Deven Phillips wrote: > I'm trying to convert a series of ISO8601 strings into TIMESTAMPs for use > with a function: > > CREATE OR REPLACE FUNCTION v1_nexus_vlan_count(id TEXT, start_time > TIMESTAMP, end_time TIMESTAMP) > RETURNS TEXT AS $$ > SELECT jsonb_pretty(jsonb_agg(row_to_json(

Re: [GENERAL] Question on how to use to_timestamp()

2016-02-13 Thread Tom Lane
Vitaly Burovoy writes: > On 2/13/16, Deven Phillips wrote: >> I'm trying to convert a series of ISO8601 strings into TIMESTAMPs for use >> with a function: ... > If your data is already in a correct ISO8601 format, you can use a > direct cast to timestamptz type: Yeah. 95% of the time, the ans

Re: [GENERAL] Question on how to use to_timestamp()

2016-02-13 Thread Deven Phillips
Thanks all! On Feb 13, 2016 11:06 PM, "Tom Lane" wrote: > Vitaly Burovoy writes: > > On 2/13/16, Deven Phillips wrote: > >> I'm trying to convert a series of ISO8601 strings into TIMESTAMPs for > use > >> with a function: ... > > > If your data is already in a correct ISO8601 format, you can us