Corey Taylor <corey.taylor.fl@xxxxxxxxx> writes: > I am trying to figure out how to debug an issue where a function > 'import_wss' called through pgadmin4 will complete but not through psql. First thing I'd look at is whether it's the same execution environment in both cases, eg same search_path. You could try doing EXPLAIN rather than running the query outright, too, to see if you get identical plans. (Although if the performance issue is down inside the function, that might not help much.) regards, tom lane