Rich LIKE inheritance - Mailing list pgsql-general

From Reg Me Please
Subject Rich LIKE inheritance
Date
Msg-id 200712192053.04811.regmeplease@gmail.com
Whole thread Raw
Responses Re: Rich LIKE inheritance
List pgsql-general
Hi all.

Is there a way to inherit from a table with the LIKE construct and
also get its indexes along with contraints, DEFAULTs and NOT NULLs?

An example:

CREATE TABLE story_base (
  flag BOOL NOT NULL DEFAULT TRUE,
  starting TIMESTAMP NOT NULL DEFAULT '-INFINITY',
  ending TIMESTAMP NOT NULL DEFAULT 'INFINTY'
);

CREATE INDEX i_story_base
  ON story_base( flag,starting,ending );

CREATE TABLE atable (
  sometext TEXT,
  LIKE story_base INCLUDING DEFAULTS
);

I'd like atable to also "inherit" an index like the one defined for
story_base.

Any hint?

--
Reg me, please!

pgsql-general by date:

Previous
From: Louis-David Mitterrand
Date:
Subject: postgres UTC different from perl?
Next
From: "Sean Z."
Date:
Subject: Re: Deploy postgres - upgrade strategy