Re: pg dump only indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 16, 2013 at 2:42 PM, Campbell, Lance <lance@xxxxxxxxxxxx> wrote:

PostgreSQL 9.2

Is there a way to use pg_dump to dump just indexes on a database?

 


I don't think you can do that using pg_dump in 9.2, but you could probably replicate the functionality using a COPY statement.
Eg
COPY (select indexdef||';' as idxdef from pg_indexes where schemaname <> 'pg_catalog' order by 1) TO '/path/to/your/file.sql';

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux