Re: [GENERAL] input out of error with haversine formula

2010-10-15 Thread Dean Rasheed
On 15 October 2010 06:03, Vince Carney vincecar...@gmail.com wrote: The following will return an input out of error as the acos() function cannot be -1 = x = 1. SELECT * FROM                 (SELECT *, (3959 * acos(cos(radians(37.7438640)) * cos(radians(37.7438640)) * cos(radians(-97.4631299)

Re: [GENERAL] column-level update privs + lock table

2010-10-15 Thread Simon Riggs
On Mon, 2010-10-11 at 09:41 -0400, Josh Kupershmidt wrote: On Thu, Oct 7, 2010 at 7:43 PM, Josh Kupershmidt schmi...@gmail.com wrote: I noticed that granting a user column-level update privileges doesn't allow that user to issue LOCK TABLE with any mode other than Access Share. Anyone

Re: [GENERAL] How to determine failed connection attempt due to invalid authorization (libpq)?

2010-10-15 Thread Bob Pawley
Hi Dimitriy Did you ever get an answer to your query regarding connection security. I`m not only interested in this aspect, I am also interested in how to detect any unauthorized connection attempt whether through the front door or the back door. Bob From: Dmitriy Igrishin Sent: Wednesday,

Re: [GENERAL] Point inside/outside area constructed by an expanded path

2010-10-15 Thread Merlin Moncure
On Thu, Oct 14, 2010 at 3:00 PM, Josi Perez (3T Systems) josipere...@gmail.com wrote: Hi, I use postgreSQL.8.4.2 and don't have postGIS installed. I have a geometric type polygon and I know that it is possible to determine if a point it is inside or not of this polygon, using anything like

Re: [GENERAL] Segfault : PostgreSQL 9.0.0 and PgPool-II.

2010-10-15 Thread Ugo PARSI
Hello, Thank you for your answer. For my simple test, I was only using pgPool-II in front of a single PgSQL server with nothing configured. I've just followed the basic installation guide of pgPool-II. From what I understand from the documentation you're referring me too, it should work in my

Re: [GENERAL] Segfault : PostgreSQL 9.0.0 and PgPool-II.

2010-10-15 Thread Ugo PARSI
Still no luck :/ I made it work though by putting everything in trust in pg_hba.conf but it's not really secure :) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Segfault : PostgreSQL 9.0.0 and PgPool-II.

2010-10-15 Thread Adrian Klaver
On Friday 15 October 2010 7:26:34 am Ugo PARSI wrote: Hello, Thank you for your answer. For my simple test, I was only using pgPool-II in front of a single PgSQL server with nothing configured. I've just followed the basic installation guide of pgPool-II. In your original message you said

[GENERAL] Strange phenomenon

2010-10-15 Thread Martial Braem
Hi, I am a Java developer, using PostgreSQL as a database. Recently I observed a strange phenomenon: 1) The database has some tables where I store my application data. I have an additional table, with no relation to any other table, just for logging purposes. In the database, a sequence is

Re: [GENERAL] It it possible to get this result in one query?

2010-10-15 Thread Nick
Thanks Guy, is it possible to get the 3rd column result as an array instead of string? -Nick On Oct 14, 9:27 pm, guyr-...@burntmail.com (Guy Rouillier) wrote: Sure: select     t3.id,     coalesce        (        t1.title,        t2.title,        t3.title        ),     coalesce        

Re: [GENERAL] Strange phenomenon

2010-10-15 Thread Szymon Guz
On 15 October 2010 09:36, Martial Braem martial.br...@abboss.be wrote: Hi, I am a Java developer, using PostgreSQL as a database. Recently I observed a strange phenomenon: 1) The database has some tables where I store my application data. I have an additional table, with no

Re: [GENERAL] It it possible to get this result in one query?

2010-10-15 Thread Merlin Moncure
On Fri, Oct 15, 2010 at 2:55 AM, Nick nboutel...@gmail.com wrote: Thanks Guy, is it possible to get the 3rd column result as an array instead of string? -Nick tbh, your solution using array_agg over union all upthread looked spot on... merlin -- Sent via pgsql-general mailing list

Re: [GENERAL] how to write an optimized sql with two same subsql?

2010-10-15 Thread Igor Neyman
-Original Message- From: sunpeng [mailto:blueva...@gmail.com] Sent: Thursday, October 14, 2010 7:34 PM To: pgsql-general@postgresql.org Subject: how to write an optimized sql with two same subsql? We have a table A: CREATE TABLE A( uid integer, groupid integer ) Now

Re: [GENERAL] Strange phenomenon

2010-10-15 Thread Tom Lane
Martial Braem martial.br...@abboss.be writes: Recently I observed a strange phenomenon: 1) The database has some tables where I store my application data. I have an additional table, with no relation to any other table, just for logging purposes. In the database, a sequence is defined

Re: [GENERAL] Strange phenomenon

2010-10-15 Thread Scott Marlowe
On Fri, Oct 15, 2010 at 12:37 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'd look around for a cron job or some other periodic task that thinks it's supposed to reload the database or something like that.  Postgres doesn't forget stuff that easily ... unless it's told to. Had a search engine eat

Re: [GENERAL] Strange phenomenon

2010-10-15 Thread Joshua J. Kugler
On Friday 15 October 2010, Scott Marlowe elucidated thus: On Fri, Oct 15, 2010 at 12:37 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'd look around for a cron job or some other periodic task that thinks it's supposed to reload the database or something like that.  Postgres doesn't forget stuff

Re: [GENERAL] Strange phenomenon

2010-10-15 Thread Craig Ringer
On 10/15/2010 03:36 PM, Martial Braem wrote: 2) On day one, I store data in my application data tables and in the logging table (transactional data). At the end of the day, I extract the data from the database for daily reporting (the ultimate proof that the transactions are actually

Re: [GENERAL] [PERFORM] help with understanding EXPLAIN

2010-10-15 Thread Craig Ringer
On 10/14/2010 05:18 AM, Brandon Casci wrote: Hello I have an application hosted on Heroku. They use postgres. It's more or less abstracted away, but I can get some performance data from New Relic. For the most part, performance is ok, but now and then some queries take a few seconds, and spike

Re: [GENERAL] It it possible to get this result in one query?

2010-10-15 Thread Guy Rouillier
Sure, did you look in the documentation? select t3.id, coalesce ( t1.title, t2.title, t3.title ), string_to_array(coalesce ( case when t1.title is not null then 'table_one,' else null end, case