Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread Achilleas Mantzios
Basically it goes beyond what ppl would describe as OS holly wars. If one chooses to go by FreeBSD, then he better be prepared to handle the burden, both the part that is imposed by the OS administration itself, as well as the part that is a side effect of the different base system. Example of

[GENERAL] Re: [postgis-users] design question: how to geocode multiple dynamic city, country?

2014-04-11 Thread Rémi Cura
Hey, my 2 cents : If you give write access, beware of the sql injections http://en.wikipedia.org/wiki/SQL_injection Cheers, Rémi-C 2014-04-10 21:48 GMT+02:00 zach cruise zachc1...@gmail.com: i accept multiple city, country from users on-the-fly, and want to dynamically map them. i could

[GENERAL] Correct syntax

2014-04-11 Thread Victor Sterpu
How would I write sutch a query? SELECT to_timestamp ('10-10-2013 15:00', 'DD-MM- HH24:MI') + interval REPLACE('1.30', '.', ':')||' hours' This gives error at REPLACE. Thank you.

Re: [GENERAL] Correct syntax

2014-04-11 Thread Vik Fearing
On 04/11/2014 10:58 AM, Victor Sterpu wrote: How would I write sutch a query? SELECT to_timestamp ('10-10-2013 15:00', 'DD-MM- HH24:MI') + interval REPLACE('1.30', '.', ':')||' hours' This gives error at REPLACE. Thank you. The way you have interval, it expects a constant. You need to

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread Alban Hertroys
On 11 Apr 2014, at 8:04, Achilleas Mantzios ach...@matrix.gatewaynet.com wrote: Basically it goes beyond what ppl would describe as OS holly wars. If one chooses to go by FreeBSD, then he better be prepared to handle the burden, both the part that is imposed by the OS administration itself,

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread Achilleas Mantzios
On 11/04/2014 13:05, Alban Hertroys wrote: On 11 Apr 2014, at 8:04, Achilleas Mantzios ach...@matrix.gatewaynet.com wrote: Basically it goes beyond what ppl would describe as OS holly wars. If one chooses to go by FreeBSD, then he better be prepared to handle the burden, both the part that

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread Alban Hertroys
On 11 Apr 2014, at 12:39, Achilleas Mantzios ach...@matrix.gatewaynet.com wrote: I moved this bit of the conversation up as it’s relevant to the OP: On 11/04/2014 13:05, Alban Hertroys wrote: On 11 Apr 2014, at 8:04, Achilleas Mantzios ach...@matrix.gatewaynet.com wrote: I don't mean to

[GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Rémi Cura
Hey dear List, I'm looking for some advice about the best way to perform a fuzzy join, that is joining two table based on approximate matching. It is about temporal matching given a table A with rows containing data and a control_time (for instance 1 ; 5; 6; .. sec, not necessarly rounded of

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread Steve Litt
On Fri, 11 Apr 2014 14:05:43 +0200 Alban Hertroys haram...@gmail.com wrote: My advice to the OP: Install FreeBSD on a system to play around with, get a feel for how it works and whether you like it or not. See how it performs with Postgres on different file-systems; UFS2 or ZFS - UFS is the

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread D'Arcy J.M. Cain
On Fri, 11 Apr 2014 09:16:04 -0400 Steve Litt sl...@troubleshooters.com wrote: Curious: Why not consider OpenBSD also? Or NetBSD. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread Achilleas Mantzios
On 11/04/2014 15:05, Alban Hertroys wrote: Although it is getting a bit specific, would you care to elaborate why you would advice strongly against using ports or packages for Postgres on FreeBSD? Because that’s a rather strong statement you’re making and so far the only argument I’ve seen is

[GENERAL] CLOB BLOB limitations in PostgreSQL

2014-04-11 Thread Jack . O'Sullivan
I am working for a client who is interested in migrating from Oracle to Postgres. Their database is currently ~20TB in size, and is growing. The biggest table in this database is effectively a BLOB store and currently has around 1 billion rows. From reading around Postgres, there are a couple

Re: [GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Andy Colson
On 4/11/2014 7:50 AM, Rémi Cura wrote: Hey dear List, I'm looking for some advice about the best way to perform a fuzzy join, that is joining two table based on approximate matching. It is about temporal matching given a table A with rows containing data and a control_time (for instance 1 ; 5;

Re: [GENERAL] CLOB BLOB limitations in PostgreSQL

2014-04-11 Thread Andy Colson
On 4/11/2014 9:45 AM, Jack.O'sulli...@tessella.com wrote: I am working for a client who is interested in migrating from Oracle to Postgres. Their database is currently ~20TB in size, and is growing. The biggest table in this database is effectively a BLOB store and currently has around 1 billion

Re: [GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Rémi Cura
Hey, thanks for your answer. I think you are right, range type with index could at least provide a fast matching, thus avoiding the numrow(A) * numrow(B) complexity . Though I don't see how to use it to interpolate for more than 1st order. Cheers, Rémi-C 2014-04-11 17:09 GMT+02:00 Andy Colson

Re: [GENERAL] CLOB BLOB limitations in PostgreSQL

2014-04-11 Thread Jack . O'Sullivan
Hi Andy, Thanks for getting those thoughts out so quickly. As far as points 1 and 2 go, it is definitely something to think about, but they are largely tangential to what I need to worry about at this moment. I am less concerned about how much disk do we need to store this than is it even

Re: [GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Andy Colson
2014-04-11 17:09 GMT+02:00 Andy Colson a...@squeakycode.net mailto:a...@squeakycode.net: On 4/11/2014 7:50 AM, Rémi Cura wrote: Hey dear List, I'm looking for some advice about the best way to perform a fuzzy join, that is joining two table based on approximate

[GENERAL] Need query

2014-04-11 Thread Gaurav Jindal
Can anybody help me with query- I have 3 tables- a,b,c a has relation with b and b has relation with c a does not have a relation with c I need to find top performing item in table 'a'. It is based on count. If more count, it is top performing. We can count only based on actions in table 'c'.

Re: [GENERAL] postgresql.conf question... CPU spikes

2014-04-11 Thread Bala Venkat
As Andy mentioned. After tuning a query, every thing settled in . Now the cpu utilization has come down a lot.. Thanks a lot for the help. I will certainly use the tool, pg_top kind regards On Fri, Apr 11, 2014 at 12:35 AM, Venkata Balaji Nagothi vbn...@gmail.comwrote: On Thu, Apr 10, 2014

Re: [GENERAL] Linux vs FreeBSD

2014-04-11 Thread D'Arcy J.M. Cain
On Fri, 11 Apr 2014 17:15:28 +0300 Achilleas Mantzios ach...@matrix.gatewaynet.com wrote: pl/java has nothing to do with this. The argument against using packages/ports for postgresql upgrades, is that upgrades in general involve : - reading HISTORY thoroughly and understanding every bit of

Re: [GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Andy Colson
On 4/11/2014 7:50 AM, Rémi Cura wrote: Hey dear List, I'm looking for some advice about the best way to perform a fuzzy join, that is joining two table based on approximate matching. It is about temporal matching given a table A with rows containing data and a control_time (for instance 1 ; 5;

Re: [GENERAL] Need query

2014-04-11 Thread David G Johnston
Gaurav Jindal wrote a has relation with b and b has relation with c Given this statement what specifically are you having difficulty with. You are allowed to perform multiple joins, whether explicit or via FROM/WHERE, in the same query. SELECT ... FROM a,b,c WHERE a=b and b=c OR SELECT ...

[GENERAL] Problem with query

2014-04-11 Thread Susan Cassidy
I have a query with several joins, where I am searching for specific data in certain columns. If I do this: SELECT distinct on (s.description, st1.description, s.scene_id) s.description, s.scene_id, to_char(s.time_of_creation, 'MM/DD/YY HH24:MI:SS'), position_0_0_0_info,

Re: [GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Andy Colson
On 4/11/2014 12:16 PM, Andy Colson wrote: On 4/11/2014 7:50 AM, Rémi Cura wrote: Hey dear List, I'm looking for some advice about the best way to perform a fuzzy join, that is joining two table based on approximate matching. It is about temporal matching given a table A with rows containing

Re: [GENERAL] efficient way to do fuzzy join

2014-04-11 Thread Rémi Cura
Wow many thanks! I had thought about the order by and limit because it is the natural way to express the problem, but I had discarded it for fear of suchbad complexity (theoretically, for each row of B , compute the distance to every other row of A!) . And it's okay if 2 row from B share the

Re: [GENERAL] Problem with query

2014-04-11 Thread David G Johnston
Susan Cassidy-3 wrote I have a query with several joins, where I am searching for specific data in certain columns. While accurate as far as describing a typical query it doesn't really tell us its intent What is the first query doing wrong? No idea, though it may have something to do

Re: [GENERAL] Problem with query

2014-04-11 Thread Chris Curvey
On Fri, Apr 11, 2014 at 1:50 PM, Susan Cassidy susan.cass...@decisionsciencescorp.com wrote: I have a query with several joins, where I am searching for specific data in certain columns. If I do this: SELECT distinct on (s.description, st1.description, s.scene_id) s.description,

Re: [GENERAL] Problem with query

2014-04-11 Thread Michael Nolan
On 4/11/14, Chris Curvey ch...@chriscurvey.com wrote: On Fri, Apr 11, 2014 at 1:50 PM, Susan Cassidy susan.cass...@decisionsciencescorp.com wrote: I have a query with several joins, where I am searching for specific data in certain columns. Have you tried running each of your joins

Re: [GENERAL] Database Design: Maintain Audit Trail of Changes

2014-04-11 Thread Moshe Jacobson
I know this is a terribly old thread, but if you are still looking for software to provide an audit trail of changes in the database, please see Cyan Audit at http://pgxn.org/dist/cyanaudit. I think it will do just what you're looking for. (Full disclosure: I am the author of this software)

[GENERAL] Is it possible to load two different versions of the JDBC driver in the same application?

2014-04-11 Thread Tecno Brain
I have a Java application that is using Postgres 9.1, and we use the latest 9.1 JDBC driver. The same Java app requires access now to a Redshift cluster. Amazon recommends to use a Postgres 8 JDBC driver for connecting to Redshift. Can I load both drivers in the same application ? I currently

Re: [GENERAL] Is it possible to load two different versions of the JDBC driver in the same application?

2014-04-11 Thread Rob Sargent
On 04/11/2014 03:31 PM, Tecno Brain wrote: I have a Java application that is using Postgres 9.1, and we use the latest 9.1 JDBC driver. The same Java app requires access now to a Redshift cluster. Amazon recommends to use a Postgres 8 JDBC driver for connecting to Redshift. Can I load both

Re: [GENERAL] Is it possible to load two different versions of the JDBC driver in the same application?

2014-04-11 Thread Dave Cramer
Ya, they probably don't like that we use server side prepared statements Might be possible to just mess with classpath's to get it done. Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On 11 April 2014 17:39, Rob Sargent robjsarg...@gmail.com wrote: On 04/11/2014 03:31