News for hackers. Stuff that matters.
Re:How to Check 2 SQL Tables Are the Same by tremon on Friday July 28, 2023 @05:53PM (#36913864)
because it violates Relational Theory

It doesn't violate relational theory at all -- it merely violates the query compiler's requirements about what must be known at the time of query compilation.

You can absolute write a query that does what you want (you need a stored procedure that generates ad-hoc functions based on the involved tables' signatures), but stored sql object must have defined inputs and outputs. What you're asking for is a meta-sql function that can translate to different query plans based on its inputs, and that's not allowed because its performance cannot be predetermined.

Re:How to Check 2 SQL Tables Are the Same by Pxtl on Sunday July 30, 2023 @10:53AM (#36931736)
C has had this problem solved with preprocessor macros for 50 years.