From: Owen Jacobson <ojacobson@osl.com>
To: Maciej Piekielniak <piechcio@isb.com.pl>
Cc: pgsql-sql@postgresql.org
Subject: Re: alter table
Date: Wed, 15 Feb 2006 12:09:39 -0800
Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC2207C4@nelson.osl.com> (raw)
Maciej Piekielniak wrote:
>
> Hello Owen,
>
> Wednesday, February 15, 2006, 8:56:05 PM, you wrote:
> >> ALTER TABLE proc MODIFY name varchar(64) DEFAULT '' NOT NULL;
>
> OJ> Not under 7.4.
>
> Hmm, maybe postgres can copy constraints and properties in
> "create table .. as select"?
What is it you're actually trying to accomplish? There's got to be a better way, but without understanding what you're doing (rather than how) it's hard to give you advice.
CREATE TABLE AS and SELECT INTO only reproduce data, not metadata. AFAIK duplicating a table's constraints involves fishing around in the pg_ system tables.
-Owen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ojacobson@osl.com, piechcio@isb.com.pl
Subject: Re: alter table
In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC2207C4@nelson.osl.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox