BUG #7865: Unexpected error code on insert of duplicate to composite primary key

Поиск
Список
Период
Сортировка
От matti.aarnio@methics.fi
Тема BUG #7865: Unexpected error code on insert of duplicate to composite primary key
Дата
Msg-id E1U4GzT-0005Q0-9a@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #7865: Unexpected error code on insert of duplicate to composite primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #7865: Unexpected error code on insert of duplicate to composite primary key  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7865
Logged by:          Matti Aarnio
Email address:      matti.aarnio@methics.fi
PostgreSQL version: 9.2.2
Operating system:   Fedora Linux 17/18
Description:        =


A table:

CREATE TABLE example (
   a   TIMESTAMP    NOT NULL,
   b   VARCHAR(256) NOT NULL,
   c   VARCHAR(256) NOT NULL,
   PRIMARY KEY(a,b,c) =

);

Inserting a duplicate record on this is returning an SQL Error, but the
status code is 0 instead of expected 23505.

This used to work fine in 8.x series, but is now causing trouble in 9.1.7,
and 9.2.3.

My application filters by the status code to detect if the issue is really
duplicate value, or some database service error.

In a few cases we want to see "it is duplicate!" in order to allow an
operation elsewhere.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: BUG #7853: Incorrect statistics in table with many dead rows.
Следующее
От: viswam mamilla
Дата:
Сообщение: