Re: Add const qualifiers to XLogRegister*() functions

2024-09-02 Thread Peter Eisentraut
On 28.08.24 12:04, Aleksander Alekseev wrote: Hi, On 04.10.23 16:37, Peter Eisentraut wrote: On 03.10.23 13:28, Aleksander Alekseev wrote: While examining the code for similar places I noticed that the following functions can also be const'ified: - XLogRegisterData (?) I don't think this

Re: Add const qualifiers to XLogRegister*() functions

2024-08-28 Thread Aleksander Alekseev
Hi, > On 04.10.23 16:37, Peter Eisentraut wrote: > > On 03.10.23 13:28, Aleksander Alekseev wrote: > >> While examining the code for similar places I noticed that the > >> following functions can also be const'ified: > > >> - XLogRegisterData (?) > > > > I don't think this would work, at least wit

Add const qualifiers to XLogRegister*() functions

2024-08-28 Thread Peter Eisentraut
ed, 28 Aug 2024 09:32:11 +0200 Subject: [PATCH] Add const qualifiers to XLogRegister*() functions Add const qualifiers to XLogRegisterData() and XLogRegisterBufData(). Several unconstify() calls can be removed. --- src/backend/access/brin/brin_pageops.c| 4 ++-- src/backend/access/tran

Re: Add const qualifiers

2023-09-26 Thread David Steele
On 9/26/23 06:34, Peter Eisentraut wrote: On 09.09.23 21:03, David Steele wrote: On 9/1/23 11:39, David Steele wrote: Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c an

Re: Add const qualifiers

2023-09-26 Thread Peter Eisentraut
On 09.09.23 21:03, David Steele wrote: On 9/1/23 11:39, David Steele wrote: Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c and that led me to use ^static const.*\*.*=

Re: Add const qualifiers

2023-09-09 Thread David Steele
On 9/1/23 11:39, David Steele wrote: Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c and that led me to use ^static const.*\*.*= to do a quick search for similar cases.

Add const qualifiers

2023-09-01 Thread David Steele
Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c and that led me to use ^static const.*\*.*= to do a quick search for similar cases. I think at the least we should make

Re: Add const qualifiers to internal range type APIs

2019-10-30 Thread Peter Eisentraut
On 2019-10-29 21:11, Andres Freund wrote: On 2019-10-29 16:48:24 +0100, Peter Eisentraut wrote: On 2019-10-28 14:05, Robert Haas wrote: Just out of curiosity, what is the motivation for this? I don't remember. :-) I had this code lying around from earlier "adventures in const", probably rela

Re: Add const qualifiers to internal range type APIs

2019-10-29 Thread Andres Freund
On 2019-10-29 16:48:24 +0100, Peter Eisentraut wrote: > On 2019-10-28 14:05, Robert Haas wrote: > > Just out of curiosity, what is the motivation for this? > > I don't remember. :-) > > I had this code lying around from earlier "adventures in const", probably > related to unconstify() and that wo

Re: Add const qualifiers to internal range type APIs

2019-10-29 Thread Peter Eisentraut
On 2019-10-28 14:05, Robert Haas wrote: On Mon, Oct 28, 2019 at 5:01 AM Peter Eisentraut wrote: This patch adds const qualifiers to internal range type APIs. It doesn't require any new casts or remove any old ones. Just out of curiosity, what is the motivation for this? I don't remember. :

Re: Add const qualifiers to internal range type APIs

2019-10-28 Thread Robert Haas
On Mon, Oct 28, 2019 at 5:01 AM Peter Eisentraut wrote: > This patch adds const qualifiers to internal range type APIs. It > doesn't require any new casts or remove any old ones. Just out of curiosity, what is the motivation for this? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com Th

Add const qualifiers to internal range type APIs

2019-10-28 Thread Peter Eisentraut
ices From 0251dbcc534aee40a201fe35b0093b06c8ecb5ff Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 28 Oct 2019 10:00:33 +0100 Subject: [PATCH] Add const qualifiers to internal range type APIs --- src/backend/utils/adt/rangetypes.c | 34 ++--- src/backend/utils/adt/rangetypes_gist.c | 8 +-- src/backend/