Search Postgresql Archives

Rich LIKE inheritance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux