Supression of NOTICEs with an ERROR

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Supression of NOTICEs with an ERROR
Date: 2002-02-06 12:23:43
Message-ID: E16YQyb-0001Wc-00@mclean.mail.mindspring.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'd like some opinions on fixing the following behavior in
psql (and postgres in general):

foobar=> CREATE TABLE foo (bar INTEGER);
CREATE
foobar=> CREATE TABLE foo (bar INTEGER UNIQUE);
NOTICE: CREATE TABLE / UNIQUE will create implicit index 'foo_bar_key' for table 'foo'
ERROR: Relation 'foo' already exists
turnstep=>

I think that this notice should not appear in this case, since
the ERROR negates the actual table creation. My first question:
is this worth pursuing?

My second question is to the method of surpression: I considered
doing it at the postgres server level, but realized that this
is probably too radical a change for the numerous clients
that connect to the server. So, I decided just to do it in
psql. Is there any NOTICE that should always be displayed,
even if an ERROR occured (and therefore the query failed)?
Seems as though the implicit creation of indexes and
sequences are the major notices used.

Thanks,
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200202060716

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBPGEf9LybkGcUlkrIEQJpGgCg1y6gUvVO/6aLJfLZTrWtAKNzdggAnRl4
hGCqbSO7/gt5aoPC5TSqMf6E
=alod
-----END PGP SIGNATURE-----

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2002-02-06 12:34:05 Re: New system OIDS inside include/catalog/pg_proc.h
Previous Message Philip Warner 2002-02-06 09:59:20 Re: v7.2 rolled last night ...