Search Postgresql Archives

Inherited FK Indexing

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

 



I have the following table set up:

CREATE TABLE states
(
state_id integer NOT NULL DEFAULT nextval ('state_province_id_seq'::regclass),
  state character(2),
  full_name character varying,
  timezone character varying,
  CONSTRAINT "PK_state_id" PRIMARY KEY (state_id)
)

CREATE TABLE canadian_provinces
(
-- Inherited: state_id integer NOT NULL DEFAULT nextval ('state_province_id_seq'::regclass),
-- Inherited:   state character(2),
-- Inherited:   full_name character varying,
-- Inherited:   timezone character varying,
  CONSTRAINT "PK_province_id" PRIMARY KEY (state_id)
)

as expected I can do select * from states and get everything out of the child table as well. What I can't do is create a FK to the states table and have it look in the child table as well. Is this on purpose? Is it possible to have FK that spans into child tables?

Thanks

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

[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