CREATE TABLE kockazat_ertekelespontok
(
   "kockazat_ertekelespontok_kod" serial NOT NULL,
   "kockazat_ertekelespontok_tkod" int4 NOT NULL,
   "elemzes_kod" int4,
   "c_userid" varchar(20),
   "c_date" date,
   "c_time" varchar(10),
   "m_userid" varchar(20),
   "m_date" date,
   "m_time" varchar(10),
   CONSTRAINT "kockazat_ertekelespontok_pk1" PRIMARY KEY ("kockazat_ertekelespontok_kod", "kockazat_ertekelespontok_tkod"),
   CONSTRAINT kockazat_ertekelespontok_fk1 FOREIGN KEY (kockazat_ertekelespontok_tkod) REFERENCES kockazat_ertekeles (kockazat_ertekeles_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE kockazat_ertekelespontok OWNER TO mbt;

CREATE INDEX kockazat_ertekelespontok_id1 ON kockazat_ertekelespontok (kockazat_ertekelespontok_tkod);