Re: [GENERAL] plpgsql function to insert or update problem

2012-03-24 Thread Andy Colson
On 03/24/2012 05:23 AM, Alban Hertroys wrote: On 23 Mar 2012, at 19:49, Andy Colson wrote: Anyway, the problem. I get a lot of DB Error messages: DB Error: ERROR: duplicate key value violates unique constraint "by_ip_pk" DETAIL: Key (ip, sessid, "time")=(97.64.237.59, 2qggi9gcdkcaoecqg3arvo1

Re: [GENERAL] plpgsql function to insert or update problem

2012-03-24 Thread Alban Hertroys
On 23 Mar 2012, at 19:49, Andy Colson wrote: > Anyway, the problem. I get a lot of DB Error messages: > DB Error: ERROR: duplicate key value violates unique constraint "by_ip_pk" > DETAIL: Key (ip, sessid, "time")=(97.64.237.59, 2qggi9gcdkcaoecqg3arvo1gu7, > 2012-03-23 13:00:00) already exists

[GENERAL] plpgsql function to insert or update problem

2012-03-23 Thread Andy Colson
Hi all, I am inserting apache log into into a database. Seem to have a little problem with this function: create or replace function insert_webstat( ivhost text, iip inet, isessid text, ihittime timestamp, iurl text, istatus integer, isi