Skip to content

Commit a07c5a1

Browse files
committed
Remove warnings for operations that have no effect when executed repeatedly.
1 parent 2f9d32c commit a07c5a1

File tree

9 files changed

+6
-36
lines changed

9 files changed

+6
-36
lines changed

src/backend/commands/async.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.98 2003/08/04 02:39:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.99 2003/09/15 00:26:31 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -221,8 +221,6 @@ Async_Listen(char *relname, int pid)
221221
if (alreadyListener)
222222
{
223223
heap_close(lRel, AccessExclusiveLock);
224-
ereport(WARNING,
225-
(errmsg("already listening on \"%s\"", relname)));
226224
return;
227225
}
228226

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.80 2003/08/30 14:59:34 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.81 2003/09/15 00:26:31 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2567,14 +2567,6 @@ AlterTableAlterOids(Oid myrelid, bool recurse, bool setOid)
25672567
*/
25682568
if (tuple_class->relhasoids == setOid)
25692569
{
2570-
if (setOid)
2571-
ereport(NOTICE,
2572-
(errmsg("table \"%s\" is already WITH OIDS",
2573-
RelationGetRelationName(rel))));
2574-
else
2575-
ereport(NOTICE,
2576-
(errmsg("table \"%s\" is already WITHOUT OIDS",
2577-
RelationGetRelationName(rel))));
25782570
heap_close(class_rel, RowExclusiveLock);
25792571
heap_close(rel, NoLock); /* close rel, but keep lock! */
25802572
return;
@@ -4001,9 +3993,6 @@ AlterTableClusterOn(Oid relOid, const char *indexName)
40013993
*/
40023994
if (indexForm->indisclustered)
40033995
{
4004-
ereport(NOTICE,
4005-
(errmsg("table \"%s\" is already being clustered on index \"%s\"",
4006-
NameStr(rel->rd_rel->relname), indexName)));
40073996
ReleaseSysCache(indexTuple);
40083997
heap_close(rel, NoLock);
40093998
return;

src/backend/commands/typecmds.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.44 2003/09/09 23:22:19 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.45 2003/09/15 00:26:31 petere Exp $
1212
*
1313
* DESCRIPTION
1414
* The "DefineFoo" routines take the parse tree and pick out the
@@ -1246,10 +1246,6 @@ AlterDomainNotNull(List *names, bool notNull)
12461246
/* Is the domain already set to the desired constraint? */
12471247
if (typTup->typnotnull == notNull)
12481248
{
1249-
ereport(NOTICE,
1250-
(errmsg("\"%s\" is already set to %s",
1251-
TypeNameToString(typename),
1252-
notNull ? "NOT NULL" : "NULL")));
12531249
heap_close(typrel, RowExclusiveLock);
12541250
return;
12551251
}

src/backend/commands/user.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.124 2003/08/04 02:39:58 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.125 2003/09/15 00:26:31 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -1498,11 +1498,6 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag)
14981498

14991499
if (!intMember(sysid, newlist))
15001500
newlist = lappendi(newlist, sysid);
1501-
else
1502-
ereport(WARNING,
1503-
(errcode(ERRCODE_DUPLICATE_OBJECT),
1504-
errmsg("user \"%s\" is already in group \"%s\"",
1505-
strVal(lfirst(item)), stmt->name)));
15061501
}
15071502

15081503
/* Do the update */

src/test/regress/expected/alter_table.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,8 +1209,7 @@ select oid > 0, * from altinhoid;
12091209
(1 row)
12101210

12111211
alter table altwithoid set without oids;
1212-
alter table altinhoid set without oids; -- fails
1213-
NOTICE: table "altinhoid" is already WITHOUT OIDS
1212+
alter table altinhoid set without oids;
12141213
select oid > 0, * from altwithoid; -- fails
12151214
ERROR: attribute "oid" not found
12161215
select oid > 0, * from altinhoid; -- fails

src/test/regress/expected/domain.out

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,9 @@ alter domain dnotnulltest set not null; -- fails
205205
ERROR: relation "domnotnull" attribute "col2" contains NULL values
206206
update domnotnull set col2 = 6;
207207
alter domain dnotnulltest set not null;
208-
alter domain dnotnulltest set not null; -- fails
209-
NOTICE: "dnotnulltest" is already set to NOT NULL
210208
update domnotnull set col1 = null; -- fails
211209
ERROR: domain dnotnulltest does not allow NULL values
212210
alter domain dnotnulltest drop not null;
213-
alter domain dnotnulltest drop not null; -- fails
214-
NOTICE: "dnotnulltest" is already set to NULL
215211
update domnotnull set col1 = null;
216212
drop domain dnotnulltest cascade;
217213
NOTICE: drop cascades to table domnotnull column col2

src/test/regress/expected/privileges.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ CREATE GROUP regressgroup1;
1111
CREATE GROUP regressgroup2 WITH USER regressuser1, regressuser2;
1212
ALTER GROUP regressgroup1 ADD USER regressuser4;
1313
ALTER GROUP regressgroup2 ADD USER regressuser2; -- duplicate
14-
WARNING: user "regressuser2" is already in group "regressgroup2"
1514
ALTER GROUP regressgroup2 DROP USER regressuser2;
1615
ALTER GROUP regressgroup2 ADD USER regressuser4;
1716
-- test owner privileges

src/test/regress/sql/alter_table.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ select oid > 0, * from altwithoid;
870870
select oid > 0, * from altinhoid;
871871

872872
alter table altwithoid set without oids;
873-
alter table altinhoid set without oids; -- fails
873+
alter table altinhoid set without oids;
874874

875875
select oid > 0, * from altwithoid; -- fails
876876
select oid > 0, * from altinhoid; -- fails

src/test/regress/sql/domain.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,10 @@ alter domain dnotnulltest set not null; -- fails
174174
update domnotnull set col2 = 6;
175175

176176
alter domain dnotnulltest set not null;
177-
alter domain dnotnulltest set not null; -- fails
178177

179178
update domnotnull set col1 = null; -- fails
180179

181180
alter domain dnotnulltest drop not null;
182-
alter domain dnotnulltest drop not null; -- fails
183181

184182
update domnotnull set col1 = null;
185183

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy