From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Gambhir Singh <gambhir.singh05@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: DDL - TYPES
Date: Thu, 08 Feb 2024 21:02:26 +0100
Message-ID: <50cb348b4516c13d65cc2fc7220afd6573882b2f.camel@cybertec.at> (raw)
In-Reply-To: <CAHOGQfXpiHX0n8+MCRLamjixhk0FcyBNGr0cB5x73ZuW9pN_0w@mail.gmail.com>
References: <CAHOGQfXpiHX0n8+MCRLamjixhk0FcyBNGr0cB5x73ZuW9pN_0w@mail.gmail.com>
On Fri, 2024-02-09 at 00:44 +0530, Gambhir Singh wrote:
> I was trying to generate DDL of functions and procedures and generated it successfully
> using the below query.
>
> [...] SELECT pg_get_functiondef(f.oid) [...]
>
> 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.
The canonical way is
pg_dump --section=pre-data yourdbname | grep 'CREATE TYPE .*\.xxxxxxxx'
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, gambhir.singh05@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: DDL - TYPES
In-Reply-To: <50cb348b4516c13d65cc2fc7220afd6573882b2f.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox