Hi Jan, Finally I've got some time to give the new driver a try. Few notes:
1. There were few places where int8 conversion has been missed, which resulted in the inability to load flags field from my old location table. Fixed by myself. 2. DB URI parsing code lost one of its features which we use. I've restored it. 3. The previous version was loading INT fields into string AVPs just fine. The new version refuses doing so. The fix seems to be relatively simple, however it requires allocating dynamic buffers on heap in the postgresql driver. I have tried to put something in quickly, but I don't know enough about memory management in the driver. Perhaps you can fix it instead. 4. There is no conversion path from PostgreSQL's timestamptz to the DB_DATETIME. 5. Updating existing data seems to be broken. The driver is apparently trying to do INSERT instead of UPDATE, which fails due to violation of unique constraint (see the log at the end of the message). Please let me know if something is unclear or if more information is needed. I look forward to hearing from you. Jan Janak wrote: > Hi Maxim, > > no problem, I apologize it took longer than I had promised, but I > encountered several problems in the client library of PostgreSQL while > working on the driver. The library indeed has rough edges, compared to > the mysql client library. Nevertheless the driver should be working now. ------------------- 3 ------------------- May 20 19:19:01 devel /usr/local/sbin/ser[59460]: ERROR: pg_fld.c:590: postgres: Cannot convert column 'reg_allowed' of type int4 to DB API field of type DB_STR ------------------- 4 ------------------- May 20 18:11:41 devel /usr/local/sbin/ser[49344]: ERROR: pg_fld.c:589: postgres: Cannot convert column 'expires' of type timestamptz to DB API field of type DB_DATETIME ------------------- 5 ------------------- May 20 19:49:00 devel postgres[59824]: [28-1] ERROR: duplicate key violates unique constraint "location_pkey" May 20 19:49:00 devel /usr/local/sbin/ser[59818]: ERROR: pg_cmd.c:428: postgres: Command on server /tmp failed: PGRES_FATAL_ERROR: ERROR: duplicate key violates unique constraint "location_pkey" May 20 19:49:00 devel postgres[59824]: [28-2] STATEMENT: insert into "location" (username,contact,expires,q,callid,cseq,flags,user_agent,received,instance,aor,server_id) May 20 19:49:00 devel postgres[59824]: [28-3] values ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) May 20 19:49:00 devel postgres[59824]: [29-1] ERROR: duplicate key violates unique constraint "location_pkey" May 20 19:49:00 devel postgres[59824]: [29-2] STATEMENT: insert into "location" (username,contact,expires,q,callid,cseq,flags,user_agent,received,instance,aor,server_id) May 20 19:49:00 devel postgres[59824]: [29-3] values ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) May 20 19:49:00 devel /usr/local/sbin/ser[59818]: ERROR: pg_cmd.c:428: postgres: Command on server /tmp failed: PGRES_FATAL_ERROR: ERROR: duplicate key violates unique constraint "location_pkey" May 20 19:49:00 devel postgres[59824]: [30-1] ERROR: duplicate key violates unique constraint "location_pkey" May 20 19:49:00 devel /usr/local/sbin/ser[59818]: ERROR: pg_cmd.c:428: postgres: Command on server /tmp failed: PGRES_FATAL_ERROR: ERROR: duplicate key violates unique constraint "location_pkey" May 20 19:49:00 devel postgres[59824]: [30-2] STATEMENT: insert into "location" (username,contact,expires,q,callid,cseq,flags,user_agent,received,instance,aor,server_id) May 20 19:49:00 devel postgres[59824]: [30-3] values ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) May 20 19:49:00 devel /usr/local/sbin/ser[59818]: ERROR: ucontact.c:549: Error while storing contact in database May 20 19:49:00 devel /usr/local/sbin/ser[59818]: wb_timer(): Error while updating contact in db -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com _______________________________________________ Serdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/serdev
