Laurenz Albe <laurenz.albe@xxxxxxxxxxx> 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