I need to migrate from Oracle to Postgres.
In Oracle I have .sql files calling nested .sql files (with input and output parameters each one) in this way: nested sql scripts and variables
Looking for a similar solution in Postgres I found this: How to run postgres sql script from another script?
But what happens with the solution: \i other_script.sql
Can I pass input parameters to it? (and if yes, how?) Can I return parameters from it? (and if yes, how?)
Or the other_script.sql and the calling.script share variables?
Or there isn't an equivalent solution for input/output parameters. And variables are not shared between the two .sql files?