BUG #1152: Primary key not applied in inherited tables - Mailing list pgsql-bugs

From PostgreSQL Bugs List
Subject BUG #1152: Primary key not applied in inherited tables
Date
Msg-id 20040511235120.3F21ACF526F@www.postgresql.com
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1152
Logged by:          Daniel Ruoso

Email address:      daniel@ruoso.com

PostgreSQL version: 7.4

Operating system:   Debian GNU/Linux sid

Description:        Primary key not applied in inherited tables

Details:

Hi,

I have the following set of tables

The main table is:
Titulo

And the following tables inherits the main table:
TituloCheque
TituloEDI
TituloDocumento

All these tables have the primary key on "idTitulo" which is inherited in
all tables from table Titulo.

The problem is:

When inserting a register in TituloCheque, postgresql didn't complain when
the value for idTitulo is already present on table Titulo.

Result:

Because of a bug in my software when generating the unnique ids for inserts
in Titulo (or any of the inherited tables) two registers in the table Titulo
(actually one in TituloEDI and other in TituloCheque). With the same Primary
Key value.

Expected Behavior:

Postgresql should refuse the insert of the second register with the same
primary key value.

pgsql-bugs by date:

Previous
From: Martin Pitt
Date:
Subject: Re: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG #1149: server includes not installed by default