newbie primary key problem - Mailing list pgsql-general

From Dan
Subject newbie primary key problem
Date
Msg-id 992363662.6879.0.nnrp-08.d4f07c93@news.demon.co.uk
Whole thread Raw
Responses Re: newbie primary key problem  (will trillich <will@serensoft.com>)
List pgsql-general
Hello,

I have a small php script to log web access that writes to a psql database.
The error I get everytime I do a refresh is:
Warning: PostgreSQL query failed: ERROR: Cannot insert a duplicate key into
unique index session_pkey in /var/www/php/web.php on line 22


As I understand it the session ID it adds is a primary key and therefore
cannot be duplicated.
Can I create another collumn that auto increments a number ( starting with 1
will be fine ) that can be the primary key/index?
Firstly is this the best way to do it, also can anyone point me to any
webpages with rough newbie instructions on this?

Thank you




pgsql-general by date:

Previous
From: "Stephen Howe"
Date:
Subject: Re: Win32 Compilation
Next
From: "Enrico Mangano"
Date:
Subject: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE on 7.0