Re: [phpOpenTracker-User] Duplicate key insertion (bug?) with postgreSQL

Jean-Christian Imbeault <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.general
Message-ID <[email protected]>
Sebastian Bergmann wrote:
> 
>   Instead of performing a SELECT before each INSERT on the data tables to
>   get the data_id for a given string, phpOpenTracker just INSERTs
>   directly. If this INSERT fails (due to a PRIMARY KEY violation if a
>   row already exists with that data_id), it is not a problem.
> 
>   At least with MySQL this strategy is *way faster* than the
>   SELECT/INSERT approach.
> 
>   I'll install PostgreSQL in the next few days on my laptop and will see
>   if I can get to the bottom of this.

If you can tell me where in the code the inserts are made I can have a
look and see if I can submit a patch against postgres to at least make
the error messages stop (They fill up the database server log file
pretty quickly ;) Using '@' is not an option since the error is logged
by the database to it's own error log file.

Also I see if there is a way to make the non-insertion of duplicate
records into postgres a little more efficient.

Jean-Christian Imbeault



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.