If this is a common question or an article exists, please let me know. I couldn't find anything specific about it in stack overflow questions or postgres/psql documentation.
This is in PostgreSQL 9.6.
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.
The function is simply a wrapper around an INSERT INTO SELECT that copies about 800k rows with some id and string conversions. This completes in about 1min through pgadmin, but does not finish when run through psql.
There are cases where the psql call does finish, but it is rare and after running several tests I can't say what conditions there are. I am running with a simple select like:
psql -c 'select import_wss()'
The only relevant issues I've run across are cases where there are multiple inserts separated by semi-colons. However, this is a single insert and query logging shows the same query run by both pgadmin and psql.
There is no other load on the db. I can reproduce this issue right after creating the db and running the script.
corey