CREATE TABLE hulladek_anyag
(
   hulladek_anyag_kod serial not null,
   hulladek_anyag_hkod int4 not null,
   kelmennyiseg varchar(20),
   kismennyiseg varchar(20),
   gongyolitett varchar(20),
   szallitolev varchar(10),
   datum_kelt date,
   "c_userid" varchar(20),
   "c_date" date,
   "c_time" varchar(10),
   "m_userid" varchar(20),
   "m_date" date,
   "m_time" varchar(10),
   CONSTRAINT "hulladek_anyag_pk1" PRIMARY KEY ("hulladek_anyag_kod"),
   CONSTRAINT hulladek_anyag_fk1 FOREIGN KEY (hulladek_anyag_hkod) REFERENCES hulladek (hulladek_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE hulladek_anyag OWNER TO mbt;

CREATE INDEX hulladek_anyag_id1 ON hulladek_anyag (hulladek_anyag_hkod);