Hi,
I was trying to generate DDL of functions and procedures and generated it successfully using the below query.
.\psql --no-align -t --host=xxxxxx --port=5432 --username=xxxx --dbname=xxxxx -c "SELECT pg_get_functiondef(f.oid) FROM pg_catalog.pg_proc f INNER JOIN pg_catalog.pg_namespace n ON (f.pronamespace = n.oid) WHERE n.nspname = 'xxxxxx' AND f.proname = 'xxxxxx' order by 1" -o 'C:\Users\Gom\Desktop\ddl.sql'
When I tried to execute the generated DDL on other DB, I am getting the below error.
2024_02_07_IntegrationObjects_D0:3495: ERROR: type "xxxxxxxx" does not exist
I am trying to find a way to generate the DDL of the TYPE, but have not been successful. Please help to provide some solution so that I can get the DDL of all the functions and procedures with the coded TYPES.
Thanks & Regards
Gambhir Singh