Re: DDL - TYPES

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: DDL - TYPES
Date: 2024-02-08 22:21:19
Message-ID: 8ab67ee36602a88a339182daff7cab4e585e13f3.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Stephen Frost 2024-02-08 22:21:29 Re: pg_basebackup --wal-method=fetch
Previous Message Ron Johnson 2024-02-08 22:06:57 Re: pg_basebackup --wal-method=fetch