From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Fehmi Noyan ISI <fnoyan(at)linuxmail(dot)org> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1162: lots of values that have "unique" property |
Date: | 2004-06-14 01:30:43 |
Message-ID: | 20040613105214.E19688@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sun, 13 Jun 2004, PostgreSQL Bugs List wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1162
> Logged by: Fehmi Noyan ISI
>
> Email address: fnoyan(at)linuxmail(dot)org
>
> PostgreSQL version: 7.4
>
> Operating system: FreeBSD 5.1 - x86 platform
>
> Description: lots of values that have "unique" property
>
> Details:
>
> Hello
> First of all I am not a database expert! I just run MySQL and PostgreSQL
> on my FreeBSD 5.1 system and develop small web applications.
> I am new to PostgreSQL and don't know this is a bug (or something like
> it) or not. But while I was reading the constraints section of user's
> manual I noticed something strange!
> Please consider the procedure below...
>
> noyan=> CREATE TABLE table_1 (
> noyan(> id integer UNIQUE NOT NULL,
> noyan(> dsc text NOT NULL,
> noyan(> passwd text NOT NULL);
>
> The table is created successfully.Ok, go on...
>
> noyan=> INSERT INTO table_1 VALUES (1,'System Admin','something');
> noyan=> INSERT INTO table_1 VALUES (1,'Normal User','something');
> ERROR: Cannot insert a duplicate key into unique index table_1_id_key
> noyan=> SELECT * FROM table_1;
> id | dsc | passwd
> ----+--------------+-----------
> 1 | System Admin | something
> (1 row)
>
> I got the error message as expected. Everything is ok.Now, let's create
> another table called "table_2" with an inheritence from "table_1".
>
> noyan=> CREATE TABLE table_2 (ext_column integer) INHERITS (table_1);
Primary key, unique and foreign key constraints are not currently
inherited by child tables. This is a known deficiency with the
inheritance system, but AFAIK isn't being actively worked on by anyone at
this time.
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Bertheau | 2004-06-14 14:56:16 | \w doesn't match non-ASCII letters |
Previous Message | PostgreSQL Bugs List | 2004-06-13 17:22:09 | BUG #1162: lots of values that have "unique" property |