Re: Override defaults in inherited fields and tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Override defaults in inherited fields and tables
Дата
Msg-id 13068.1030764883@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Override defaults in inherited fields and tables  (Uwe Feldtmann <uwe@microshare.com.au>)
Список pgsql-general
Uwe Feldtmann <uwe@microshare.com.au> writes:
> Is it possible to override the defaults in inherited fields when
> defining tables?

Sure.  This has worked for a release or two, IIRC:

regression=# create table parent (f1 int default 42);
CREATE TABLE
regression=# create table child (f1 int default 43) inherits (parent);
NOTICE:  CREATE TABLE: merging attribute "f1" with inherited definition
CREATE TABLE
regression=# insert into child default values;
INSERT 153946 1
regression=# select * from child;
 f1
----
 43
(1 row)


            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Uwe Feldtmann
Дата:
Сообщение: Override defaults in inherited fields and tables
Следующее
От: Garo Hussenjian
Дата:
Сообщение: Bigint in sequences