X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4D9EA9DC9CD for ; Wed, 15 Feb 2006 16:09:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07065-06 for ; Wed, 15 Feb 2006 16:09:42 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from nelson.osl.com (216-21-133-120.ip.van.radiant.net [216.21.133.120]) by postgresql.org (Postfix) with ESMTP id 1F9029DC9B1 for ; Wed, 15 Feb 2006 16:09:39 -0400 (AST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: Re: alter table Date: Wed, 15 Feb 2006 12:09:39 -0800 Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC2207C4@nelson.osl.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re[2]: [SQL] alter table Thread-Index: AcYyayQaEBxgCTGaS7y6nLHdIdBWiwAACcBA From: "Owen Jacobson" To: "Maciej Piekielniak" Cc: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200602/183 X-Sequence-Number: 24193 Maciej Piekielniak wrote: >=20 > Hello Owen, >=20 > Wednesday, February 15, 2006, 8:56:05 PM, you wrote: > >> ALTER TABLE proc MODIFY name varchar(64) DEFAULT '' NOT NULL; >=20 > OJ> Not under 7.4. >=20 > Hmm, maybe postgres can copy constraints and properties in=20 > "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