When creating functions with the same name but different numbers of arguments, sorting might not work as expected.
For example, in postgres, if you repeatedly create and delete the following function, the difference will appear with tbls diff.
CREATE OR REPLACE FUNCTION add(integer, integer) RETURNS integer
AS 'select $1 + $2;'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION add(integer, integer, integer) RETURNS integer
AS 'select $1 + $2 + $3;'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
What happened
When creating functions with the same name but different numbers of arguments, sorting might not work as expected.
For example, in postgres, if you repeatedly create and delete the following function, the difference will appear with
tbls diff
.diff
What you expected to happened
Function arguments are also included in the sorting target.
What stack trace or error message from tbls did you see?
Nothing
Anything else we need to know?
Proposal for how to fix it
Environment
tbls version
: 1.70.0