pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Move is_valid_ascii() to ascii.h.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Move is_valid_ascii() to ascii.h.
@ 2024-01-29 18:09  Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Nathan Bossart @ 2024-01-29 18:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Move is_valid_ascii() to ascii.h.

This function requires simd.h, which is a rather large dependency
for a widely-used header file like pg_wchar.h.  Furthermore, there
is a report of a third-party tool that is struggling to use
pg_wchar.h due to its dependence on simd.h (presumably because
simd.h uses several intrinsics).  Moving the function to the much
less popular ascii.h resolves these issues for now.

This commit is back-patched for the benefit of the aforementioned
third-party tool.  The simd.h dependency was only added in v16,
but we've opted to back-patch to v15 so that is_valid_ascii() lives
in the same file for all versions where it exists.  This could
break existing third-party code that uses the function, but we
couldn't find any examples of such code.  It should be possible to
fix any code that this commit breaks by including ascii.h in the
file that uses is_valid_ascii().

Author: Jubilee Young
Reviewed-by: Tom Lane, John Naylor, Andres Freund, Eric Ridge
Discussion: https://postgr.es/m/CAPNHn3oKJJxMsYq%2BqLYzVJOFrUcOr4OF1EC-KtFT-qh8nOOOtQ%40mail.gmail.com
Backpatch-through: 15

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3726c1cb0e3bd18d8916978e18d95251d07360c3

Modified Files
--------------
src/common/wchar.c        |  1 +
src/include/mb/pg_wchar.h | 53 -----------------------------------------------
src/include/utils/ascii.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 53 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Move is_valid_ascii() to ascii.h.
@ 2024-01-29 18:09  Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Nathan Bossart @ 2024-01-29 18:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Move is_valid_ascii() to ascii.h.

This function requires simd.h, which is a rather large dependency
for a widely-used header file like pg_wchar.h.  Furthermore, there
is a report of a third-party tool that is struggling to use
pg_wchar.h due to its dependence on simd.h (presumably because
simd.h uses several intrinsics).  Moving the function to the much
less popular ascii.h resolves these issues for now.

This commit is back-patched for the benefit of the aforementioned
third-party tool.  The simd.h dependency was only added in v16,
but we've opted to back-patch to v15 so that is_valid_ascii() lives
in the same file for all versions where it exists.  This could
break existing third-party code that uses the function, but we
couldn't find any examples of such code.  It should be possible to
fix any code that this commit breaks by including ascii.h in the
file that uses is_valid_ascii().

Author: Jubilee Young
Reviewed-by: Tom Lane, John Naylor, Andres Freund, Eric Ridge
Discussion: https://postgr.es/m/CAPNHn3oKJJxMsYq%2BqLYzVJOFrUcOr4OF1EC-KtFT-qh8nOOOtQ%40mail.gmail.com
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/97287bdfae41b8ea16b27dccb63771fcc196a55a

Modified Files
--------------
src/common/wchar.c        |  1 +
src/include/mb/pg_wchar.h | 69 -----------------------------------------------
src/include/utils/ascii.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 69 insertions(+), 69 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Move is_valid_ascii() to ascii.h.
@ 2024-01-29 18:09  Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Nathan Bossart @ 2024-01-29 18:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Move is_valid_ascii() to ascii.h.

This function requires simd.h, which is a rather large dependency
for a widely-used header file like pg_wchar.h.  Furthermore, there
is a report of a third-party tool that is struggling to use
pg_wchar.h due to its dependence on simd.h (presumably because
simd.h uses several intrinsics).  Moving the function to the much
less popular ascii.h resolves these issues for now.

This commit is back-patched for the benefit of the aforementioned
third-party tool.  The simd.h dependency was only added in v16,
but we've opted to back-patch to v15 so that is_valid_ascii() lives
in the same file for all versions where it exists.  This could
break existing third-party code that uses the function, but we
couldn't find any examples of such code.  It should be possible to
fix any code that this commit breaks by including ascii.h in the
file that uses is_valid_ascii().

Author: Jubilee Young
Reviewed-by: Tom Lane, John Naylor, Andres Freund, Eric Ridge
Discussion: https://postgr.es/m/CAPNHn3oKJJxMsYq%2BqLYzVJOFrUcOr4OF1EC-KtFT-qh8nOOOtQ%40mail.gmail.com
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1b924a86e696c25775e873ccd4cac1f24ec6502f

Modified Files
--------------
src/common/wchar.c        |  1 +
src/include/mb/pg_wchar.h | 69 -----------------------------------------------
src/include/utils/ascii.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 69 insertions(+), 69 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-01-29 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 18:09 pgsql: Move is_valid_ascii() to ascii.h. Nathan Bossart <nathan@postgresql.org>
2024-01-29 18:09 pgsql: Move is_valid_ascii() to ascii.h. Nathan Bossart <nathan@postgresql.org>
2024-01-29 18:09 pgsql: Move is_valid_ascii() to ascii.h. Nathan Bossart <nathan@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox