Update of wrong coloum???

From: Terry Mackintosh <terry(at)terrym(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Update of wrong coloum???
Date: 1998-09-24 03:58:24
Message-ID: Pine.LNX.3.95.980923233400.8318A-100000@terry1.acun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi All

System: Red Hat 4.2, kernel 2.0.35, flex 2.5.4

For a couple of weeks now I have been having a problem..., I finally
nerrowed it down to this:

shell_connection=> update dllocation set selt = 'f';
ERROR: Cannot insert a duplicate key into a unique index
shell_connection=> \d dllocation

Table = dllocation
+------------------------------+--------------------------------+-------+
| Field | Type | Length|
+------------------------------+--------------------------------+-------+
| location | char() not null | 20 |
| selt | bool not null default 'f' | 1 |
+------------------------------+--------------------------------+-------+
Index: dl_location
shell_connection=>

The index dl_location is unique, btree.
There is no index on selt ( selt == selected )
There is less then a 1000 rows in the table, about 600 I think.

The results of the above update are NOT consistant, some times I get the
above error, some times it works, some times I get told that the backend
crashed.

The version I am running is a snap shot from 2? days ago, but have been
having the problem with older snap shots for the last week+.

Also, the part of my PHP 3 script that uses the above query is also new,
with a new feature I added about 2 weeks ago.

As you can see, the above query was run by hand in psql, so the problem is
not PHP or the PHP script.

As a side not, PostgreSQL built fine, and passed all regression tests,
even random.

Thanks, have a great night
Terry Mackintosh <terry(at)terrym(dot)com> http://www.terrym.com
sysadmin/owner Please! No MIME encoded or HTML mail, unless needed.

Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.3
-------------------------------------------------------------------
Success Is A Choice ... book by Rick Patino, get it, read it!

Browse pgsql-admin by date

  From Date Subject
Next Message Bernhard Ertl 1998-09-24 11:30:33 Postgres on Solaris Intel/Sparc
Previous Message Murad Nayal 1998-09-23 21:25:21 Bad semaphore address: regression test problems