cmp-sql connects to postgres and cockroach servers and compares the results of SQL statements. Statements support both random generation and random placeholder values. It can thus be used to do correctness or compatibility testing.
To use, start a cockroach and postgres server with SSL disabled. cmp-sql will connect to both, generate some random SQL, and print an error when difference results are returned. Currently it tests LIKE, binary operators, and unary operators. cmp-sql runs a loop: 1) choose an Input, 2) generate a random SQL string from from the Input, 3) generate random placeholders, 4) execute the SQL + placeholders and compare results.
The Inputs slice determines what SQL is generated. cmp-sql will repeatedly generate new kinds of input SQL. The `sql` property of an Input is a function that returns a SQL string with possible placeholders. The `args` func slice generates the placeholder arguments.