bad error message

From: "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar>
To: pgsql-hackers(at)postgresql(dot)org, <pgsql-general(at)postgresql(dot)org>
Subject: bad error message
Date: 2001-02-12 22:13:38
Message-ID: 01021219133805.04835@math.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

When I try this commands, some error messages aren't right:

[postgres(at)math pgsql]$ createdb test
CREATE DATABASE
[postgres(at)math pgsql]$ psql test
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

test=# CREATE TABLE dedicacion (
test(# id_dedi SERIAL UNIQUE,
test(# nombre_dedi CHAR(10) UNIQUE
test(# );
NOTICE: CREATE TABLE will create implicit sequence 'dedicacion_id_dedi_seq'
for SERIAL column 'dedicacion.id_dedi'
NOTICE: CREATE TABLE/UNIQUE will create implicit index
'dedicacion_id_dedi_key' for table 'dedicacion'
NOTICE: CREATE TABLE/UNIQUE will create implicit index
'dedicacion_id_dedi_key' for table 'dedicacion'
NOTICE: CREATE TABLE/UNIQUE will create implicit index
'dedicacion_nombre_dedi_key' for table 'dedicacion'
ERROR: Cannot create index: 'dedicacion_id_dedi_key' already exists
test=# \dt
List of relations
Name | Type | Owner
-------------+-------+----------
pga_forms | table | postgres
pga_queries | table | postgres
pga_reports | table | postgres
pga_schema | table | postgres
pga_scripts | table | postgres
(5 rows)

test=#

Now, as you can see, the error says it couldn't create the index. It says
nothing about the table not been created, but it doesn't apeare anywhere.
This happens when I put the redundant UNIQUE to the serial data type.

If someone is asking why I do this, it's because I program also for informix,
and the serial data type in informix doesn't have unique values.

Hope someone can change these error messages, because it took me some time to
find out what was wrong.

Saludos... :-)

--
System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués email: martin(at)math(dot)unl(dot)edu(dot)ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-12 22:18:56 Re: Howto install postgresql 7.03 on Darwin 1.2
Previous Message Peter Eisentraut 2001-02-12 22:06:02 Re: 7.1 Docs WAS:Auto-timestamp generator (attached)

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-02-12 22:56:41 Re: pg_dump output
Previous Message Peter Eisentraut 2001-02-12 21:26:44 Re: pg_dump output