--
-- PostgreSQL database dump
--

SET client_encoding = 'LATIN1';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- Name: casas; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA casas;


ALTER SCHEMA casas OWNER TO postgres;

--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';


--
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE PROCEDURAL LANGUAGE plpgsql;


SET search_path = casas, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = true;

--
-- Name: fotitos; Type: TABLE; Schema: casas; Owner: postgres; Tablespace: 
--

CREATE TABLE fotitos (
    id_foto integer NOT NULL,
    fotos oid
);


ALTER TABLE casas.fotitos OWNER TO postgres;

--
-- Name: fotitos_id_foto_seq; Type: SEQUENCE; Schema: casas; Owner: postgres
--

CREATE SEQUENCE fotitos_id_foto_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE casas.fotitos_id_foto_seq OWNER TO postgres;

--
-- Name: fotitos_id_foto_seq; Type: SEQUENCE OWNED BY; Schema: casas; Owner: postgres
--

ALTER SEQUENCE fotitos_id_foto_seq OWNED BY fotitos.id_foto;


SET default_with_oids = false;

--
-- Name: fotos_rep; Type: TABLE; Schema: casas; Owner: postgres; Tablespace: 
--

CREATE TABLE fotos_rep (
    id_foto integer NOT NULL,
    imagen bytea
);


ALTER TABLE casas.fotos_rep OWNER TO postgres;

--
-- Name: fotos_rep_id_foto_seq; Type: SEQUENCE; Schema: casas; Owner: postgres
--

CREATE SEQUENCE fotos_rep_id_foto_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE casas.fotos_rep_id_foto_seq OWNER TO postgres;

--
-- Name: fotos_rep_id_foto_seq; Type: SEQUENCE OWNED BY; Schema: casas; Owner: postgres
--

ALTER SEQUENCE fotos_rep_id_foto_seq OWNED BY fotos_rep.id_foto;


SET search_path = public, pg_catalog;

SET default_with_oids = true;

--
-- Name: table1; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE table1 (
    nombre character varying(30),
    fecha timestamp without time zone DEFAULT now()
);


ALTER TABLE public.table1 OWNER TO postgres;

SET search_path = casas, pg_catalog;

--
-- Name: id_foto; Type: DEFAULT; Schema: casas; Owner: postgres
--

ALTER TABLE fotitos ALTER COLUMN id_foto SET DEFAULT nextval('fotitos_id_foto_seq'::regclass);


--
-- Name: id_foto; Type: DEFAULT; Schema: casas; Owner: postgres
--

ALTER TABLE fotos_rep ALTER COLUMN id_foto SET DEFAULT nextval('fotos_rep_id_foto_seq'::regclass);


--
-- Name: fotitos_pkey; Type: CONSTRAINT; Schema: casas; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fotitos
    ADD CONSTRAINT fotitos_pkey PRIMARY KEY (id_foto);


--
-- Name: ndxidfoto; Type: INDEX; Schema: casas; Owner: postgres; Tablespace: 
--

CREATE UNIQUE INDEX ndxidfoto ON fotos_rep USING btree (id_foto);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--

