CREATE TABLE hulladek_hb
(
   hulladek_hb_kod serial not null,
   hulladek_hb_pkod int4 not null,
   hulladek_hb_tkod int4 not null,
   partner varchar(80),
   datum_kelt date,
   partnerazonosito varchar(5),
   telepazonosito varchar(5),
   letszamkat varchar(30),
   teleptipus varchar(50),
   htnum int4,
   hknum int4,
   hbnum int4,
   numsum int4,
   negyedev varchar(1),
   nev varchar(60),
   beosztas varchar(60),
   telefon varchar(20),
   fax varchar(20),
   email varchar(100),
   beszamolasiido varchar(4),
   eprtrnum int4,
   "c_userid" varchar(20),
   "c_date" date,
   "c_time" varchar(10),
   "m_userid" varchar(20),
   "m_date" date,
   "m_time" varchar(10),
   CONSTRAINT "hulladek_hb_pk1" PRIMARY KEY ("hulladek_hb_kod"),
   CONSTRAINT hulladek_hb_fk1 FOREIGN KEY (hulladek_hb_pkod, hulladek_hb_tkod) REFERENCES telephely (telephely_pkod, telephely_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE hulladek_hb OWNER TO mbt;

CREATE INDEX hulladek_hb_id1 ON hulladek_hb (hulladek_hb_pkod, hulladek_hb_tkod);