BUG #1152: Primary key not applied in inherited tables

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1152: Primary key not applied in inherited tables
Date: 2004-05-11 23:51:20
Message-ID: 20040511235120.3F21ACF526F@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1152
Logged by: Daniel Ruoso

Email address: daniel(at)ruoso(dot)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.

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2004-05-12 07:17:30 Re: BUG #1149: server includes not installed by default
Previous Message Martin Pitt 2004-05-11 23:47:09 Re: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)