DDL - TYPES

From: Gambhir Singh <gambhir(dot)singh05(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: DDL - TYPES
Date: 2024-02-08 19:14:23
Message-ID: CAHOGQfXpiHX0n8+MCRLamjixhk0FcyBNGr0cB5x73ZuW9pN_0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2024-02-08 20:02:26 Re: DDL - TYPES
Previous Message Ron Johnson 2024-02-08 17:54:31 Re: pg_basebackup --wal-method=fetch