pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ron Johnson <ronljohnsonjr@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: DDL - TYPES
Date: Thu, 08 Feb 2024 23:21:19 +0100
Message-ID: <8ab67ee36602a88a339182daff7cab4e585e13f3.camel@cybertec.at> (raw)
In-Reply-To: <CANzqJaAWDb2EPrrWpuPW4afq2V8oJ6GgGUZVkCSA=WSem-APcQ@mail.gmail.com>
References: <CAHOGQfXpiHX0n8+MCRLamjixhk0FcyBNGr0cB5x73ZuW9pN_0w@mail.gmail.com>
	<50cb348b4516c13d65cc2fc7220afd6573882b2f.camel@cybertec.at>
	<CANzqJaAWDb2EPrrWpuPW4afq2V8oJ6GgGUZVkCSA=WSem-APcQ@mail.gmail.com>

On Thu, 2024-02-08 at 16:03 -0500, Ron Johnson wrote:
> > 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'
> 
> They're never multi-line? 

Never, unless you create a type with a newline in its name:

  CREATE TYPE "my
  type" AS ENUM ('silly');

Yours,
Laurenz Albe





view thread (5+ messages)  latest in thread

Message-ID: <8ab67ee36602a88a339182daff7cab4e585e13f3.camel@cybertec.at>
Permalink:  ../8ab67ee36602a88a339182daff7cab4e585e13f3.camel@cybertec.at/
Also on:    postgresql.org/message-id/8ab67ee36602a88a339182daff7cab4e585e13f3.camel@cybertec.at

 · 

reply

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, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: DDL - TYPES
  In-Reply-To: <8ab67ee36602a88a339182daff7cab4e585e13f3.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