overriding default value in inherited column - Mailing list pgsql-general

From Matt Magoffin
Subject overriding default value in inherited column
Date
Msg-id 996fq4$16g8$1@news.tht.net
Whole thread Raw
List 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@



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: What could cause postmaster to be started many times?
Next
From: "Jeff Fitzmyers"
Date:
Subject: RE: What could cause postmaster to be started many times?