overriding default value in inherited column

Поиск
Список
Период
Сортировка
От Matt Magoffin
Тема overriding default value in inherited column
Дата
Msg-id 996fq4$16g8$1@news.tht.net
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: What could cause postmaster to be started many times?
Следующее
От: "Jeff Fitzmyers"
Дата:
Сообщение: RE: What could cause postmaster to be started many times?