--
-- PostgreSQL database dump
--

-- Dumped from database version 9.5.1
-- Dumped by pg_dump version 9.5.1

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: tabblock_00_10; Type: TABLE; Schema: public; Owner: census
--

CREATE TABLE tabblock_00_10 (
    state_2000 text,
    county_2000 text,
    tract_2000 text,
    blk_2000 text,
    blksf_2000 text,
    arealand_2000 integer,
    areawater_2000 integer,
    block_part_flag_o text,
    state_2010 text,
    county_2010 text,
    tract_2010 text,
    blk_2010 text,
    blksf_2010 text,
    arealand_2010 integer,
    areawater_2010 integer,
    block_part_flag_r text,
    arealand_int integer,
    areawater_int integer,
    geoid00 text,
    geoid10 text,
    c00_10 double precision,
    c10_00 double precision
);


ALTER TABLE tabblock_00_10 OWNER TO census;

--
-- Name: tabblock_00_10_geoid00_idx; Type: INDEX; Schema: public; Owner: census
--

CREATE INDEX tabblock_00_10_geoid00_idx ON tabblock_00_10 USING btree (geoid00);


--
-- Name: tabblock_00_10_geoid10_idx; Type: INDEX; Schema: public; Owner: census
--

CREATE INDEX tabblock_00_10_geoid10_idx ON tabblock_00_10 USING btree (geoid10);


--
-- Name: tabblock_00_10_state_2000_county_2000_tract_2000_blk_2000_idx; Type: INDEX; Schema: public; Owner: census
--

CREATE INDEX tabblock_00_10_state_2000_county_2000_tract_2000_blk_2000_idx ON tabblock_00_10 USING btree (state_2000, county_2000, tract_2000, blk_2000);


--
-- Name: tabblock_00_10_state_2010_county_2010_tract_2010_blk_2010_idx; Type: INDEX; Schema: public; Owner: census
--

CREATE INDEX tabblock_00_10_state_2010_county_2010_tract_2010_blk_2010_idx ON tabblock_00_10 USING btree (state_2010, county_2010, tract_2010, blk_2010);


--
-- PostgreSQL database dump complete
--


-- This is where I add creating the full geoid
update tabblock_00_10 set geoid00 = concat(state_2000, county_2000, tract_2000, blk_2000), 
                          geoid10 = concat(state_2010, county_2010, tract_2010, blk_2010);
