MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/q2mkue/so_umm_this_is_from_twitch_source_code_leak/hfnrl6e
r/badcode • u/Jolly_goodday • Oct 06 '21
400 comments sorted by
View all comments
Show parent comments
8
Create table "banned_username_patterns" ...
now in PostgreSQL there are a few ways. For example
select any (select ue.login ~ t.pattern from banned_username_patterns as t)
https://stackoverflow.com/a/13565021
Also, as others have mentioned this shouldn't be done on the DB. No need for using the database here. Unless someone was post-hock banning users.
1 u/recycle4science Oct 07 '21 See! I knew Postgres would have a better way.
1
See! I knew Postgres would have a better way.
8
u/RedditAcc-92975 Oct 06 '21
Create table "banned_username_patterns" ...
now in PostgreSQL there are a few ways. For example
select any (select ue.login ~ t.pattern from banned_username_patterns as t)
https://stackoverflow.com/a/13565021
Also, as others have mentioned this shouldn't be done on the DB. No need for using the database here. Unless someone was post-hock banning users.