CREATE TABLE hulladek
(
   hulladek_kod serial not null,
   hulladek_pkod int4 not null,
   hulladek_tkod int4 not null,
   nev varchar(60),
   ewc varchar(15),
   un varchar(15),
   veszoszt varchar(5),
   ev varchar(4),
   fizmegforma varchar(20),
   atvevo varchar(60),
   kuj varchar(10),
   ktj varchar(10),
   alairas varchar(30),
   kezelesikod varchar(6),
   "c_userid" varchar(20),
   "c_date" date,
   "c_time" varchar(10),
   "m_userid" varchar(20),
   "m_date" date,
   "m_time" varchar(10),
   CONSTRAINT "hulladek_pk1" PRIMARY KEY ("hulladek_kod"),
   CONSTRAINT hulladek_fk1 FOREIGN KEY (hulladek_pkod, hulladek_tkod) REFERENCES telephely (telephely_pkod, telephely_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE hulladek OWNER TO mbt;

CREATE INDEX hulladek_id1 ON hulladek (nev);