Supression of NOTICEs with an ERROR - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Supression of NOTICEs with an ERROR
Date
Msg-id E16YQyb-0001Wc-00@mclean.mail.mindspring.net
Whole thread Raw
Responses Re: Supression of NOTICEs with an ERROR  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@turnstep.com
PGP Key: 0x14964AC8 200202060716

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

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





pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: v7.2 rolled last night ...
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: New system OIDS inside include/catalog/pg_proc.h