Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5170~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5170
Choose a head ref
  • 3 commits
  • 5 files changed
  • 3 contributors

Commits on Apr 2, 2025

  1. Remove setlocale() from check_locale().

    Validate locale names with newlocale() or _create_locale() instead, to
    avoid clobbering global state.
    
    This also removes the "canonicalization" of the locale name, which
    previously had two user-visible effects:
    
    1.  CREATE DATABASE ... LOCALE = '' would look up the locale from
    environment variables, but this was not documented behavior and doesn't
    seem too useful.  A default will normally be inherited from the template
    if you just leave the option off.  (Note that initdb still chooses
    default values from the server environment, and that would often be the
    original source of the template database's values.)
    
    2.  On Windows only, the setlocale() step reached by CREATE DATABASE ...
    LOCALE = '...' did accept a wide range of formats and do some
    canonicalization, when using (deprecated) pre-BCP 47 locale names, but
    again it seems enough to let that happen in the initdb phase only.
    
    Now, CREATE DATABASE and SET lc_XXX reject ''.  CREATE COLLATION
    continues to accept it, as it never recorded canonicalized values so
    there may be system catalogs containing verbatim '' in the wild.  We'll
    need to research the upgrade implications before banning it there.
    
    Thanks to Peter Eisentraut and Tom Lane for the suggestion that we might
    not really need to preserve those behaviors in the backend, in our hunt
    for non-thread-safe code.
    
    Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
    Discussion: https://postgr.es/m/CA%2BhUKGJqVe0%2BPv9dvC9dSums_PXxGo9SWcxYAMBguWJUGbWz-A%40mail.gmail.com
    Discussion: https://postgr.es/m/CA%2BhUKGK57sgUYKO03jB4VarTsswfMyScFAyJpVnYD8c%2Bg12_mg%40mail.gmail.com
    macdice authored and Commitfest Bot committed Apr 2, 2025
    Configuration menu
    Copy the full SHA
    8981ff5 View commit details
    Browse the repository at this point in the history
  2. Add "646" as a codeset name for ASCII

    Returned by nl_langinfo_l() on NetBSD.
    petere authored and Commitfest Bot committed Apr 2, 2025
    Configuration menu
    Copy the full SHA
    8f96f82 View commit details
    Browse the repository at this point in the history
  3. [CF 5170] Thread-safe nl_langinfo(), localeconv(), check_locale()

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5170
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/ddcb47f2-842e-4e80-9ab6-f4d7427c5df7@eisentraut.org
    Author(s): Thomas Munro
    Commitfest Bot committed Apr 2, 2025
    Configuration menu
    Copy the full SHA
    3b51601 View commit details
    Browse the repository at this point in the history
Loading