/*
PGSQL Data Transfer
Source Host: localhost
Source Database: dblunigiana
Target Host: localhost
Target Database: dblunigiana
Date: 2/11/2009 5:32:24 PM
*/


-- ----------------------------
-- Table structure for "public"."t_prossimita"
-- ----------------------------
drop table "public"."t_prossimita";
CREATE TABLE "public"."t_prossimita"(
"id_prs" int4 NOT NULL DEFAULT nextval('t_prossimita_id_prs_seq'::regclass),
"id_ogg" int4 NOT NULL ,
"id_top" int4 NOT NULL ,
"posizione" varchar NOT NULL ,
"id_doc" int4 ,
PRIMARY KEY ("id_prs"),
FOREIGN KEY ("id_top") REFERENCES "public"."t_toponimi"("id_top") ON UPDATE NO ACTION ON DELETE NO ACTION ,
FOREIGN KEY ("id_ogg") REFERENCES "public"."t_oggetti"("id_ogg") ON UPDATE NO ACTION ON DELETE NO ACTION 
)  WITHOUT OIDS;

CREATE INDEX "fki_top" ON "public"."t_prossimita" USING btree ("id_top");

CREATE INDEX "fki_ogg_prs" ON "public"."t_prossimita" USING btree ("id_ogg");

-- ----------------------------
-- Records 
-- ----------------------------
