pgsql: Remove dead code

2025-01-16 Thread Peter Eisentraut
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 Discussion: https://www.postgresql

pgsql: Remove dead code in get_param_path_clause_serials()

2024-11-25 Thread Richard Guo
Remove dead code in get_param_path_clause_serials() The function get_param_path_clause_serials() is used to get the set of pushed-down clauses enforced within a parameterized Path. Since we don't currently support parameterized MergeAppend paths, and it doesn't look like that is going to change a

pgsql: Remove dead code

2024-08-12 Thread Peter Eisentraut
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 Discussion: https://www.postgresql.org/message-id

pgsql: Remove dead code

2024-04-17 Thread Peter Eisentraut
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

pgsql: Remove dead code in pg_ctl.c.

2023-10-25 Thread Nathan Bossart
Remove dead code in pg_ctl.c. Missed in 39969e2a1e. Author: David Steele Discussion: https://postgr.es/m/0c742f0c-d663-419d-b5a7-4fe867f5566c%40pgmasters.net Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fdeb6e6a74f26e7b4504d358ffc751a6d74c08ab Modified Files -

pgsql: Remove dead code in DecodeInterval()

2023-08-27 Thread Michael Paquier
Remove dead code in DecodeInterval() This commit removes some dead code related to the unit type RESERV, whose last use has been removed from the unit lookup table used for intervals ("deltatktbl" in datetime.c) in 666cbae16da4. Before that, RESERV was used as an equivalent of "invalid", but that

pgsql: Remove dead code in formatting.c

2023-01-16 Thread John Naylor
Remove dead code in formatting.c Remove some code guarded by IS_MINUS() or IS_PLUS(), where the entire stanza is inside an else-block where both of these are false. This should slightly improve test coverage. While at it, remove coding that apparently assumes that unsetting a bit is so expensive

Re: pgsql: Remove dead code

2022-12-22 Thread Michael Paquier
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 signature.asc Description: PGP signature

Re: pgsql: Remove dead code

2022-12-22 Thread Justin Pryzby
On Thu, Dec 22, 2022 at 07:21:50AM +, 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. diff --git a/src/backend/catalog/aclchk.c b/src/ba

pgsql: Remove dead code

2022-12-21 Thread Peter Eisentraut
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 |

pgsql: Remove dead code in do_pg_backup_start().

2022-04-11 Thread Tom Lane
Remove dead code in do_pg_backup_start(). As of commit 39969e2a1, no caller of do_pg_backup_start() passes NULL for labelfile or tblspcmapfile, nor is it plausible that any would do so in the future. Remove the code that coped with that case, as (a) it's dead and (b) it causes Coverity to bleat a

pgsql: Remove dead code in ECPGconnect(), and improve documentation.

2021-02-11 Thread Tom Lane
Remove dead code in ECPGconnect(), and improve documentation. The stanza in ECPGconnect() that intended to allow specification of a Unix socket directory path in place of a port has never executed since it was committed, nearly two decades ago; the preceding strrchr() already found the last colon

pgsql: Remove dead code from _bt_update_posting().

2020-03-01 Thread Peter Geoghegan
Remove dead code from _bt_update_posting(). Discussion: https://postgr.es/m/CAH2-WzmAufHiOku6AGiFD=81vqs5nyj1l2ykhw1t+bh4cms...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/84ec9b231a865348f5388dcc125c084297709332 Modified Files -- sr

pgsql: Remove dead code.

2019-07-15 Thread Tom Lane
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-d7ee66279...@redhat.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4c3d05d875dd173a8

pgsql: Remove dead code from nbtsplitloc.c.

2019-03-24 Thread Peter Geoghegan
Remove dead code from nbtsplitloc.c. It doesn't make sense to consider the possibility that there will only be one candidate split point when choosing among split points to find the split with the lowest penalty. This is a vestige of an earlier version of the patch that became commit fab25024. I

pgsql: Remove dead code in toast_fetch_datum_slice

2018-12-10 Thread Stephen Frost
Remove dead code in toast_fetch_datum_slice In toast_fetch_datum_slice(), we Assert() that what is passed in isn't compressed, but we then later had a check to see what the length of if what was passed in is compressed. That later check is rather confusing since toast_fetch_datum_slice() is only

pgsql: Remove dead code from pop_next_work_item().

2018-09-17 Thread Tom Lane
Remove dead code from pop_next_work_item(). The pref_non_data heuristic has been dead code for nearly ten years, and as far as I can tell was dead code even when it was first committed. I'm tired of silencing Coverity complaints about it, so get rid of it. If anyone is ever interested in pursuing

pgsql: Remove dead code left behind by 1b6801051.

2018-07-30 Thread Tom Lane
Remove dead code left behind by 1b6801051. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5a71d3e58333f764b4fc34f3cf93521c964f64f6 Modified Files -- src/backend/nodes/bitmapset.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

pgsql: Remove dead code left behind by 1b6801051.

2018-07-30 Thread Tom Lane
Remove dead code left behind by 1b6801051. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6574f19127ea539408267c1891ccc12ca5ebeca2 Modified Files -- src/backend/nodes/bitmapset.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

pgsql: Remove dead code for temporary relations in partition planning

2018-07-03 Thread Michael Paquier
Remove dead code for temporary relations in partition planning Since recent commit 1c7c317c, temporary relations cannot be mixed with permanent relations within the same partition tree, and the same counts for temporary relations created by other sessions, which the planner simply discarded. Inst

pgsql: Remove dead code for temporary relations in partition planning

2018-07-03 Thread Michael Paquier
Remove dead code for temporary relations in partition planning Since recent commit 1c7c317c, temporary relations cannot be mixed with permanent relations within the same partition tree, and the same counts for temporary relations created by other sessions, which the planner simply discarded. Inst