pgsql/create_tables.pgsql
branchv0.6.x
changeset 503 492c179094c9
parent 502 e1b32377032f
child 511 0244f1344b04
equal deleted inserted replaced
502:e1b32377032f 503:492c179094c9
   171     CONSTRAINT  pkey_relocated PRIMARY KEY (gid, address),
   171     CONSTRAINT  pkey_relocated PRIMARY KEY (gid, address),
   172     CONSTRAINT  fkey_relocated_gid_domain_data FOREIGN KEY (gid)
   172     CONSTRAINT  fkey_relocated_gid_domain_data FOREIGN KEY (gid)
   173         REFERENCES domain_data (gid)
   173         REFERENCES domain_data (gid)
   174 );
   174 );
   175 
   175 
       
   176 CREATE TABLE catchall (
       
   177     gid         bigint NOT NULL,
       
   178     destination varchar(320) NOT NULL,
       
   179     CONSTRAINT  pkey_catchall PRIMARY KEY (gid, destination),
       
   180     CONSTRAINT  fkey_catchall_gid_domain_data FOREIGN KEY (gid)
       
   181         REFERENCES domain_data (gid)
       
   182 );
       
   183 
   176 CREATE OR REPLACE VIEW postfix_gid AS
   184 CREATE OR REPLACE VIEW postfix_gid AS
   177     SELECT gid, domainname
   185     SELECT gid, domainname
   178       FROM domain_name;
   186       FROM domain_name;
   179 
   187 
   180 CREATE OR REPLACE VIEW vmm_domain_info AS
   188 CREATE OR REPLACE VIEW vmm_domain_info AS