overriding default value in inherited column

From: "Matt Magoffin" <mmagoffin(at)proxicom(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: overriding default value in inherited column
Date: 2001-03-20 02:39:27
Message-ID: 996fq4$16g8$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there an easy way to override the defined default value of a column in an
inherited table? For example:

CREATE table foo (
"type" int2 DEFAULT 0
);

CREATE table bar (
"type" int2 DEFAULT 1
) INHERITS (foo);

This gives the error:

ERROR: CREATE TABLE: attribute "type" already exists in inherited schema

which is understandable. In essence what I want to do is have each table
schema default to a different value.

-- m@

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Fitzmyers 2001-03-20 02:49:20 RE: What could cause postmaster to be started many times?
Previous Message Tom Lane 2001-03-20 01:55:16 Re: What could cause postmaster to be started many times?