this post was submitted on 30 Jun 2024
23 points (100.0% liked)
SQL
474 readers
1 users here now
Related Fediverse communities:
- #sql on Mastodon
- #postgresql on Mastodon
- c/PostgreSQL on programming.dev
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Personally, I'd look very closely at any records this returns and verify that they are normal. A previous developer could have left some sort of backdoor or other nasty surprise in the code/database such could only be tripped with a very specific condition.
Alternatively, consider the context around this code. What is done with those records? Maybe there is a very specific bug elsewhere in the code or in a front end tied to this database. Sure, the right solution was to fix that other bug. But, that may not have been an option. So, this strange bit of code "solved" the problem and was then promptly forgotten.
The
client
table has around 100,000 rows each with a uniqueclientId
, none of which are returned from the CAST / ABS / SINI think you are right and this is a 'fix' for something lost to time. I am going to talk to the original dev tomorrow to see if they remember what it was for
Let us know, ya?