pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove dead code.
10+ messages / 6 participants
[nested] [flat]

Commits from this thread:
  2022-12-23 2fcf685f6d e3897a3a4c 7ad458e06b 4dbe72d61a 7445869e1b df6fea51f0  Fix come incorrect elog() messages in aclchk.c
* pgsql: Remove dead code.
@ 2015-02-03 07:44 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 10+ messages in thread

From: Heikki Linnakangas @ 2015-02-03 07:44 UTC (permalink / raw)
  To: pgsql-committers

Remove dead code.

Commit 13629df changed metaphone() function to return an empty string on
empty input, but it left the old error message in place. It's now dead code.

Michael Paquier, per Coverity warning.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4eaafa045362298adfe61fdd83b47b22211c75d1

Modified Files
--------------
contrib/fuzzystrmatch/fuzzystrmatch.c |    5 -----
1 file changed, 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code.
@ 2015-07-19 17:21 Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 10+ messages in thread

From: Andrew Dunstan @ 2015-07-19 17:21 UTC (permalink / raw)
  To: pgsql-committers

Remove dead code.

Defect noticed by Coverity.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9aa663463bbf123e9d38dab88eeaef981fbc6caf

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code.
@ 2015-07-19 17:21 Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 10+ messages in thread

From: Andrew Dunstan @ 2015-07-19 17:21 UTC (permalink / raw)
  To: pgsql-committers

Remove dead code.

Defect noticed by Coverity.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/0ed1e572b644e064e480e14d2f6afe03d11638a7

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code.
@ 2019-07-16 03:27 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 10+ messages in thread

From: Tom Lane @ 2019-07-16 03:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove dead code.

These memory context switches are useless in the wake of commit
1cff1b95a.  Noted by Jesper Pedersen.

Discussion: https://postgr.es/m/f078ce63-9e04-0f3e-d200-d7ee66279abe@redhat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4c3d05d875dd173a81a995c6e14d69496b467eec

Modified Files
--------------
src/backend/commands/async.c | 7 -------
1 file changed, 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code
@ 2022-12-22 07:21 Peter Eisentraut <peter@eisentraut.org>
  2022-12-22 15:30 ` Re: pgsql: Remove dead code Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Peter Eisentraut @ 2022-12-22 07:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove dead code

The second appearance of NamespaceRelationId in this if-else chain is
in error and can be removed.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/73bb72f0ca2833329b59ebaf9476be3be71e462f

Modified Files
--------------
src/backend/catalog/aclchk.c | 1 -
1 file changed, 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Remove dead code
  2022-12-22 07:21 pgsql: Remove dead code Peter Eisentraut <peter@eisentraut.org>
@ 2022-12-22 15:30 ` Justin Pryzby <pryzby@telsasoft.com>
  2022-12-23 01:05   ` Re: pgsql: Remove dead code Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 10+ messages in thread

From: Justin Pryzby @ 2022-12-22 15:30 UTC (permalink / raw)
  To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-committers@lists.postgresql.org

On Thu, Dec 22, 2022 at 07:21:50AM +0000, Peter Eisentraut wrote:
> Remove dead code
> 
> The second appearance of NamespaceRelationId in this if-else chain is
> in error and can be removed.

This caused me to notice various wrong-looking elog()s.

inline patch 1: src/backend/catalog/aclchk.c (+3/-3 lines) download inline-1.patchdiff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index 35a09ea8dac..444407260be 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -4365,19 +4365,19 @@ recordExtObjInitPriv(Oid objoid, Oid classoid) /* pg_foreign_server */ else if (classoid == ForeignServerRelationId) { Datum aclDatum; bool isNull; HeapTuple tuple; tuple = SearchSysCache1(FOREIGNSERVEROID, ObjectIdGetDatum(objoid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for foreign data wrapper %u", + elog(ERROR, "cache lookup failed for foreign server %u", objoid); aclDatum = SysCacheGetAttr(FOREIGNSERVEROID, tuple, Anum_pg_foreign_server_srvacl, &isNull); /* Add the record, if any, for the top-level object */ if (!isNull) recordExtensionInitPrivWorker(objoid, classoid, 0, @@ -4451,19 +4451,19 @@ recordExtObjInitPriv(Oid objoid, Oid classoid) /* pg_namespace */ else if (classoid == NamespaceRelationId) { Datum aclDatum; bool isNull; HeapTuple tuple; tuple = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(objoid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for function %u", objoid); + elog(ERROR, "cache lookup failed for schema %u", objoid); aclDatum = SysCacheGetAttr(NAMESPACEOID, tuple, Anum_pg_namespace_nspacl, &isNull); /* Add the record, if any, for the top-level object */ if (!isNull) recordExtensionInitPrivWorker(objoid, classoid, 0, DatumGetAclP(aclDatum)); @@ -4493,19 +4493,19 @@ recordExtObjInitPriv(Oid objoid, Oid classoid) /* pg_type */ else if (classoid == TypeRelationId) { Datum aclDatum; bool isNull; HeapTuple tuple; tuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(objoid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for function %u", objoid); + elog(ERROR, "cache lookup failed for type %u", objoid); aclDatum = SysCacheGetAttr(TYPEOID, tuple, Anum_pg_type_typacl, &isNull); /* Add the record, if any, for the top-level object */ if (!isNull) recordExtensionInitPrivWorker(objoid, classoid, 0, DatumGetAclP(aclDatum));
^ permalink raw reply [nested|flat] 10+ messages in thread

* Re: pgsql: Remove dead code
  2022-12-22 07:21 pgsql: Remove dead code Peter Eisentraut <peter@eisentraut.org>
  2022-12-22 15:30 ` Re: pgsql: Remove dead code Justin Pryzby <pryzby@telsasoft.com>
@ 2022-12-23 01:05   ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 10+ messages in thread

From: Michael Paquier @ 2022-12-23 01:05 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: Peter Eisentraut <peter@eisentraut.org>; pgsql-committers@lists.postgresql.org

On Thu, Dec 22, 2022 at 09:30:41AM -0600, Justin Pryzby wrote:
> This caused me to notice various wrong-looking elog()s.

Nice catch.  These have been wrong for quite some time, so I have done
something down to v11 while passing by..
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code
@ 2024-04-17 08:52 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 10+ messages in thread

From: Peter Eisentraut @ 2024-04-17 08:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove dead code

The configure check for HAVE_DECL_LLVMORCREGISTERPERF was removed by
e9a9843e138, but some code guarded by it was left.  (That commit
removed the "register" calls but left the "unregister" calls.)  That
code cannot be reached anymore, so remove it.

Reported-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://www.postgresql.org/message-id/5539b16c-cff7-46d5-9621-c3fb6b549e9e@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ca89db5f9d0b03a10706312bbe8b8a43b1ec7538

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 8 --------
1 file changed, 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code
@ 2024-08-12 07:00 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 10+ messages in thread

From: Peter Eisentraut @ 2024-08-12 07:00 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove dead code

After e9931bfb751, the locale argument of SB_lower_char() is never
NULL, so the branch that deals with NULL can be removed (similar to
how e9931bfb751 for example removed those branches in str_tolower()).

Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://www.postgresql.org/message-id/4f562d84-87f4-44dc-8946-01d6c437936f@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4eb5089e26848ecb71f9e15086e4064597108564

Modified Files
--------------
src/backend/utils/adt/like.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Remove dead code
@ 2025-01-16 13:43 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 10+ messages in thread

From: Peter Eisentraut @ 2025-01-16 13:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove dead code

As of commit 9895b35cb88, AlterDomainAddConstraint() can only be
called with constraints of type CONSTR_CHECK and CONSTR_NOTNULL.  So
all the code to check for and reject other constraint type values is
dead and can be removed.

Author: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxHitd5LGLBSSAPShhtDWxT0ViVKTHinkYW-skBX93TcpA@mail....

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7407b2d48cf37bc8847ae6c47dde2164ef2faa34

Modified Files
--------------
src/backend/commands/typecmds.c | 54 ++---------------------------------------
1 file changed, 2 insertions(+), 52 deletions(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2025-01-16 13:43 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 07:44 pgsql: Remove dead code. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2015-07-19 17:21 pgsql: Remove dead code. Andrew Dunstan <andrew@dunslane.net>
2015-07-19 17:21 pgsql: Remove dead code. Andrew Dunstan <andrew@dunslane.net>
2019-07-16 03:27 pgsql: Remove dead code. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-22 07:21 pgsql: Remove dead code Peter Eisentraut <peter@eisentraut.org>
2022-12-22 15:30 ` Re: pgsql: Remove dead code Justin Pryzby <pryzby@telsasoft.com>
2022-12-23 01:05   ` Re: pgsql: Remove dead code Michael Paquier <michael@paquier.xyz>
2024-04-17 08:52 pgsql: Remove dead code Peter Eisentraut <peter@eisentraut.org>
2024-08-12 07:00 pgsql: Remove dead code Peter Eisentraut <peter@eisentraut.org>
2025-01-16 13:43 pgsql: Remove dead code Peter Eisentraut <peter@eisentraut.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox