Re: DDL - TYPES - Mailing list pgsql-admin

From Tom Lane
Subject Re: DDL - TYPES
Date
Msg-id 1261630.1707431524@sss.pgh.pa.us
Whole thread Raw
In response to Re: DDL - TYPES  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-admin
Laurenz Albe <laurenz.albe@cybertec.at> writes:
>> They're never multi-line? 

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

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

I think Ron was pointing out that the creation command as a whole
could run to multiple lines --- which is true, as a quick look
at the pg_dump source code will confirm.  dumpEnumType for example
will put a newline after each enum value.  So you'd need something
smarter than grep to extract a usable result.

One idea is to use pg_restore -l and then -L to extract a single
dump object from an archive dump.

            regards, tom lane



pgsql-admin by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pg_basebackup --wal-method=fetch
Next
From: Ron Johnson
Date:
Subject: Re: pg_basebackup --wal-method=fetch