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!
Reg Me Please wrote: > 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? CREATE TABLE ... LIKE isn't inheritance, it's copying the structure. I believe you can duplicate indexes in 8.3. -- Richard Huxton Archonet Ltd
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера