DDL - TYPES

Поиск
Список
Период
Сортировка
От Gambhir Singh
Тема DDL - TYPES
Дата
Msg-id CAHOGQfXpiHX0n8+MCRLamjixhk0FcyBNGr0cB5x73ZuW9pN_0w@mail.gmail.com
обсуждение исходный текст
Ответы Re: DDL - TYPES  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: pg_basebackup --wal-method=fetch
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: DDL - TYPES