pgsql: Add unicode_strtitle() for Unicode Default Case Conversion.

2024-03-29 Thread Jeff Davis
Add unicode_strtitle() for Unicode Default Case Conversion.

This brings the titlecasing implementation for the builtin provider
out of formatting.c and into unicode_case.c, along with
unicode_strlower() and unicode_strupper(). Accepts an arbitrary word
boundary callback.

Simple for now, but can be extended to support the Unicode Default
Case Conversion algorithm with full case mapping.

Discussion: 
https://postgr.es/m/3bc653b5d562ae9e2838b11cb696816c328a489a.ca...@j-davis.com
Reviewed-by: Peter Eisentraut

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/46e5441fa536b89c1123f270fdfeeb72c320b901

Modified Files
--
src/backend/utils/adt/formatting.c | 107 +++--
src/common/unicode_case.c  |  76 +++---
src/include/common/unicode_case.h  |   5 ++
3 files changed, 140 insertions(+), 48 deletions(-)



pgsql: Remove superfluous trailing semicolons

2024-03-29 Thread Daniel Gustafsson
Remove superfluous trailing semicolons

Two semicolons were accidentally added to rows which were already
terminated semicolons.  While harmless, fix by removing these.

Author: Richard Guo 
Discussion: 
https://postgr.es/m/cambws4_fnj0+yogfioswzle7t6r8p6cqbuacfvezqbesfaj...@mail.gmail.com

Branch
--
master

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

Modified Files
--
src/include/lib/radixtree.h| 2 +-
src/test/modules/test_tidstore/test_tidstore.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Use version for builtin collations.

2024-03-29 Thread Jeff Davis
Use version for builtin collations.

Given that the version field already exists, there's little reason not
to use it. Suggestion from Peter Eisentraut.

Discussion: 
https://postgr.es/m/613c120a-5413-4fa7-a501-6590eae55...@eisentraut.org
Reviewed-by: Peter Eisentraut

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/46a44dc372033da9bd8b9840711e560c9d73e768

Modified Files
--
src/backend/utils/adt/pg_locale.c| 14 --
src/include/catalog/catversion.h |  2 +-
src/include/catalog/pg_collation.dat |  4 ++--
3 files changed, 15 insertions(+), 5 deletions(-)



Re: pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Bruce Momjian
On Fri, Mar 29, 2024 at 08:47:18AM -0400, Robert Haas wrote:
> Oh no! Jelte, I'm so sorry ... I spelled your name wrong in this
> commit message. :-(
> 
> Please accept my apologies.

I have made a record of this so I will make sure it is accurate in the
release notes.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  Only you can decide what is important to you.




pgsql: Try to stabilize flappy test result.

2024-03-29 Thread Tom Lane
Try to stabilize flappy test result.

This recently-added test case checks the plan of an inner join
between two identical tables.  It's just chance which join order
the planner will pick, and in the presence of any variation in
the underlying statistics, the displayed plan might change.
Add a WHERE condition to break the cost symmetry and hopefully
stabilize matters.

(We're still trying to understand exactly why the underlying
statistics aren't as stable as intended, but this seems like
a good change anyway, since this test would surely bite us
again in future.)

While here, clean up assorted comment spelling, grammar, and
whitespace problems.

Discussion: https://postgr.es/m/4168116.1711720...@sss.pgh.pa.us

Branch
--
master

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

Modified Files
--
src/test/regress/expected/subselect.out | 14 --
src/test/regress/sql/subselect.sql  | 13 +++--
2 files changed, 15 insertions(+), 12 deletions(-)



Re: pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Robert Haas
On Fri, Mar 29, 2024 at 9:03 AM Jelte Fennema-Nio  wrote:
> no worries, these things happen. I'm just glad it's committed and I
> can now focus on different things than back and forth discussion over
> documentation that all looks pretty much identical to me.

Yeah, imagine that!

-- 
Robert Haas
EDB: http://www.enterprisedb.com




Re: pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Jelte Fennema-Nio
no worries, these things happen. I'm just glad it's committed and I
can now focus on different things than back and forth discussion over
documentation that all looks pretty much identical to me.

On Fri, 29 Mar 2024 at 13:47, Robert Haas  wrote:
>
> Oh no! Jelte, I'm so sorry ... I spelled your name wrong in this
> commit message. :-(
>
> Please accept my apologies.
>
> ...Robert
>
> On Fri, Mar 29, 2024 at 8:45 AM Robert Haas  wrote:
> >
> > Add allow_alter_system GUC.
> >
> > This is marked PGC_SIGHUP, so it can only be set in a configuration
> > file, not anywhere else; and it is also marked GUC_DISALLOW_IN_AUTO_FILE,
> > so it can't be set using ALTER SYSTEM. When set to false, the
> > ALTER SYSTEM command is disallowed.
> >
> > There was considerable concern that this would be misinterpreted as
> > a security feature, which it is not, because a determined superuser
> > has various ways of bypassing it. Hence, a lot of work has gone into
> > wordsmithing the documentation, in the hopes of avoiding any such
> > confusion.
> >
> > Jelte Fennemia-Nio and Gabriele Bartolini, with wording suggestions
> > for the documentation from many others.
> >
> > Discussion: 
> > http://postgr.es/m/CA%2BVUV5rEKt2%2BCdC_KUaPoihMu%2Bi5ChT4WVNTr4CD5-xXZUfuQw%40mail.gmail.com
> >
> > Branch
> > --
> > master
> >
> > Details
> > ---
> > https://git.postgresql.org/pg/commitdiff/d3ae2a24f265a028f4b9e8df79ea7b075c6cf016
> >
> > Modified Files
> > --
> > doc/src/sgml/config.sgml  | 51 
> > ++-
> > doc/src/sgml/ref/alter_system.sgml|  8 +
> > src/backend/utils/misc/guc.c  |  5 +++
> > src/backend/utils/misc/guc_tables.c   | 17 +
> > src/backend/utils/misc/postgresql.conf.sample |  1 +
> > src/include/utils/guc.h   |  1 +
> > 6 files changed, 82 insertions(+), 1 deletion(-)
> >
>
>
> --
> Robert Haas
> EDB: http://www.enterprisedb.com




Re: pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Robert Haas
Oh no! Jelte, I'm so sorry ... I spelled your name wrong in this
commit message. :-(

Please accept my apologies.

...Robert

On Fri, Mar 29, 2024 at 8:45 AM Robert Haas  wrote:
>
> Add allow_alter_system GUC.
>
> This is marked PGC_SIGHUP, so it can only be set in a configuration
> file, not anywhere else; and it is also marked GUC_DISALLOW_IN_AUTO_FILE,
> so it can't be set using ALTER SYSTEM. When set to false, the
> ALTER SYSTEM command is disallowed.
>
> There was considerable concern that this would be misinterpreted as
> a security feature, which it is not, because a determined superuser
> has various ways of bypassing it. Hence, a lot of work has gone into
> wordsmithing the documentation, in the hopes of avoiding any such
> confusion.
>
> Jelte Fennemia-Nio and Gabriele Bartolini, with wording suggestions
> for the documentation from many others.
>
> Discussion: 
> http://postgr.es/m/CA%2BVUV5rEKt2%2BCdC_KUaPoihMu%2Bi5ChT4WVNTr4CD5-xXZUfuQw%40mail.gmail.com
>
> Branch
> --
> master
>
> Details
> ---
> https://git.postgresql.org/pg/commitdiff/d3ae2a24f265a028f4b9e8df79ea7b075c6cf016
>
> Modified Files
> --
> doc/src/sgml/config.sgml  | 51 ++-
> doc/src/sgml/ref/alter_system.sgml|  8 +
> src/backend/utils/misc/guc.c  |  5 +++
> src/backend/utils/misc/guc_tables.c   | 17 +
> src/backend/utils/misc/postgresql.conf.sample |  1 +
> src/include/utils/guc.h   |  1 +
> 6 files changed, 82 insertions(+), 1 deletion(-)
>


-- 
Robert Haas
EDB: http://www.enterprisedb.com




pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Robert Haas
Add allow_alter_system GUC.

This is marked PGC_SIGHUP, so it can only be set in a configuration
file, not anywhere else; and it is also marked GUC_DISALLOW_IN_AUTO_FILE,
so it can't be set using ALTER SYSTEM. When set to false, the
ALTER SYSTEM command is disallowed.

There was considerable concern that this would be misinterpreted as
a security feature, which it is not, because a determined superuser
has various ways of bypassing it. Hence, a lot of work has gone into
wordsmithing the documentation, in the hopes of avoiding any such
confusion.

Jelte Fennemia-Nio and Gabriele Bartolini, with wording suggestions
for the documentation from many others.

Discussion: 
http://postgr.es/m/CA%2BVUV5rEKt2%2BCdC_KUaPoihMu%2Bi5ChT4WVNTr4CD5-xXZUfuQw%40mail.gmail.com

Branch
--
master

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

Modified Files
--
doc/src/sgml/config.sgml  | 51 ++-
doc/src/sgml/ref/alter_system.sgml|  8 +
src/backend/utils/misc/guc.c  |  5 +++
src/backend/utils/misc/guc_tables.c   | 17 +
src/backend/utils/misc/postgresql.conf.sample |  1 +
src/include/utils/guc.h   |  1 +
6 files changed, 82 insertions(+), 1 deletion(-)