CREATE TABLE test.totem
(
  oid serial NOT NULL,
  totem_id double precision NOT NULL,
  codice double precision NOT NULL,
  CONSTRAINT totem_pkey PRIMARY KEY (oid),
  CONSTRAINT totem_codice_key UNIQUE (codice, totem_id)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE test.totem OWNER TO postgres;

SELECT AddGeometryColumn('test', 'totem', 'wkb_geometry', 25832, 'POINT', 2); 
