Help using SELECT INTO to make schema - Mailing list pgsql-general

From Robert James
Subject Help using SELECT INTO to make schema
Date
Msg-id e09785e00907221515uec2315bqe1fadd2c758d5c4c@mail.gmail.com
Whole thread Raw
Responses Re: Help using SELECT INTO to make schema
List pgsql-general
I'd like to SELECT INTO one table into another one. However, I'd like to do two things that I don't know how to do using SELECT INTO:

 1. Copy over the indexes and constraints of the first table into the second
 2. Do SELECT INTO even if the second table already exists.

Is there anyway to do either one of those?

Failing that, is there a way to copy a table's schema - its columns, indexes, and constraints - into a new (empty) table?

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can LIKE under utf8 use INDEXes?
Next
From: Jeff Davis
Date:
Subject: Re: Help using SELECT INTO to make schema