Skip to content

Add PostgreSQL 19 compatibility#33

Open
sibowu-aws wants to merge 1 commit into
pgbigm:masterfrom
sibowu-aws:master
Open

Add PostgreSQL 19 compatibility#33
sibowu-aws wants to merge 1 commit into
pgbigm:masterfrom
sibowu-aws:master

Conversation

@sibowu-aws

Copy link
Copy Markdown

PG19 made two changes that broke pg_bigm's existing PG18 fallback for
t_isspace() (originally added in commit which copied the PG17
implementation after PG18 removed t_isspace via core commit d3aad4ac57c - postgres/postgres@d3aad4a):

  • the database_ctype_is_c global flag is gone; the equivalent
    information now lives on pg_locale_t->ctype_is_c, retrievable
    via pg_database_locale().
  • char2wchar() is no longer exported from utils/pg_locale.h
    (it was made static in src/backend/utils/adt/pg_locale_libc.c).

Add a PG_VERSION_NUM >= 190000 branch to t_isspace() that uses the new
public API: pg_database_locale() for the locale, pg_mb2wchar_with_len()
to decode the multibyte character, and pg_iswspace() for the classify
call. This mirrors the pattern PG19 itself uses in
src/backend/tsearch/ts_locale.c for t_isalnum / t_isalpha. The PG18
code path is preserved unchanged.

Also add alternate expected outputs (expected/pg_bigm_2.out,
expected/pg_bigm_ja_2.out) so the regression suite passes on PG19,
where:

  • escape_string_warning was removed (SET errors out).
  • standard_conforming_strings can no longer be turned off
    (SET errors out, and the dependent \-escape tests behave
    differently under standard strings).
  • the "function does not exist" error switched its trailing
    line from HINT to DETAIL with a new message.

The original expected files are kept, so PG <= 18 continues to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant