Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,16 @@
# `sep` can be a single character or a string but it will be interpreted
# as part of a regexp within square brackets, so be careful if characters
# such as `-` are used.
create or replace function remove_comment(s, sep) as (
regexp_replace(s, '\s*[' || sep || '].*', '')
);
# Examples
select s,
remove_comment(s, '#') as decommented,
regexp_replace(decommented, ' ', '_','g') as visible
from unnest(
['apples ; pears # and bananas',
'apples # pears ; and bananas']
) _s(s);