Skip site navigation (1) Skip section navigation (2)

UNIQUE constraint no longer works under 6.5.1

From: Mark Dalphin <mdalphin(at)amgen(dot)com>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: UNIQUE constraint no longer works under 6.5.1
Date: 1999-08-13 22:57:23
Message-ID: 37B4A2D3.622E294C@amgen.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-general
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               :       Mark Dalphin
Your email address      :       mdalphin(at)amgen(dot)com


System Configuration
---------------------
  Architecture (example: Intel Pentium)         :  SGI Octane

  Operating System (example: Linux 2.0.26 ELF)  :  Irix 6.5

  PostgreSQL version (example: PostgreSQL-6.5.1):   PostgreSQL-6.5.1

  Compiler used (example:  gcc 2.8.0)           :   native cc


Please enter a FULL description of your problem:
------------------------------------------------

Using the UNIQUE constraint in a TABLE definition no longer does anything.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

The following is the output from my using '\i' to read in my SQL. Notice
that there is no longer any comment about creating an index to perform
the UNIQUE constraint on the field, 'Login'.

Testing with INSERT confirms that I can add duplicates.

CREATE SEQUENCE mkPersonID;
CREATE

CREATE TABLE Person (
        PersonID int PRIMARY KEY DEFAULT nextval('mkPersonID'),
        DateAdded timestamp             -- Date user added to system
                NOT NULL DEFAULT getTimeStamp(),
        Login char(40) UNIQUE NOT NULL, -- User's NT Login name
        CONSTRAINT validLogin CHECK (RTrim(Login) <> '')
);
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'person_pkey' for
table 'person'
CREATE

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------


--
Mark Dalphin                          email: mdalphin(at)amgen(dot)com
Mail Stop: 29-2-A                     phone: +1-805-447-4951 (work)
One Amgen Center Drive                       +1-805-375-0680 (home)
Thousand Oaks, CA 91320                 fax: +1-805-499-9955 (work)




pgsql-bugs by date

Next:From: Tom LaneDate: 1999-08-14 14:46:31
Subject: Re: [BUGS] UNIQUE constraint no longer works under 6.5.1
Previous:From: Victor VislobokovDate: 1999-08-12 17:30:11
Subject: bug

pgsql-general by date

Next:From: John HendersonDate: 1999-08-14 02:18:46
Subject: FATAL 1: palloc failure: memory exhausted
Previous:From: Duncan KinderDate: 1999-08-13 18:39:05
Subject: Re: [GENERAL] Environmental Variables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group