Rich LIKE inheritance

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Rich LIKE inheritance
Date: 2007-12-19 19:53:04
Message-ID: 200712192053.04811.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Z. 2007-12-19 19:55:56 Re: Deploy postgres - upgrade strategy
Previous Message Louis-David Mitterrand 2007-12-19 19:31:32 postgres UTC different from perl?