Setting default row value after select into table

From: Rich Ryan <postgres(at)weblynk(dot)com>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgreSQL(dot)org>
Subject: Setting default row value after select into table
Date: 1999-10-28 06:34:16
Message-ID: 009a01bf210e$75b7c5e0$9befaace@usedcars.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

When I do somthing like
select cdate into table newt from oldt;
and say, row cdate in table oldt had a default value of 'now', the new table
newt doesn't have the default value anymore. This makes sense since it is
copying just data, not meta-data into the new table. So, is there a way to
alter the cdate row in the new table to have a default? Could not find an
alter table command for this.
Thanks,
Rich

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Haris Susanto 1999-10-28 09:46:02 Re: [SQL] Date comparisons
Previous Message Tom Lane 1999-10-27 14:28:11 Re: [SQL] Date comparisons