--
-- PostgreSQL database dump
--

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

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: mytest; Type: TABLE; Schema: public; Owner: jkupershmidt; Tablespace: 
--

DROP TABLE IF EXISTS mytest;

CREATE TABLE mytest (
    id integer NOT NULL,
    poly geometry,
    CONSTRAINT enforce_dims_poly CHECK ((st_ndims(poly) = 2)),
    CONSTRAINT enforce_geotype_poly CHECK (((geometrytype(poly) = 'POLYGON'::text) OR (poly IS NULL))),
    CONSTRAINT enforce_srid_poly CHECK ((st_srid(poly) = 4326))
);


--
-- Data for Name: mytest; Type: TABLE DATA; Schema: public; Owner: jkupershmidt
--

COPY mytest (id, poly) FROM stdin;
771676	0103000020E61000000100000015000000A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540
771677	0103000020E61000000100000015000000A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540
771678	0103000020E61000000100000015000000A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540
771675	0103000020E61000000100000015000000A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540A301BC0512C451C04B598638D62D4540
\.


--
-- Name: mytest_pkey; Type: CONSTRAINT; Schema: public; Owner: jkupershmidt; Tablespace: 
--

ALTER TABLE ONLY mytest
    ADD CONSTRAINT mytest_pkey PRIMARY KEY (id);


--
-- PostgreSQL database dump complete
--


-- The following SELECT is expected to return all four rows,
-- but always only returns 3 (skipping the first row COPY'ed into the table).
SELECT id FROM mytest WHERE ST_Intersects(poly, ST_GeomFromEWKB('\x0103000020e61000000100000021000000649900ef218751c0b28861fd7c0f45400b76a3688a8c51c01492a2998cff4440ea86e0f3fd9351c01744fa3e7cf14440dd606d9f329d51c021af6e02d3e54440a3f667cdcea751c0d174c87900dd44407998af7c6cb351c03e29e8e758d74440b26aa6d89cbf51c0bc2d055e12d544405cf6f3f9ebcb51c0631533e142d64440eba789c5e4d751c01e81c79edfda4440bcd745d814e351c0bcf5df35bde2444051fef36c10ed51c04280cc1791ed4440f41e1d2876f551c0c12506fcf3fa44402e3066b1f2fb51c08c29275e650a45401a0d9bfd430052c0daafc6f44f1b4540e6b3bc273c0252c025e4fe060f2d4540688c7db3c30152c0102ee27bf43e45404f96c011dbfe51c0f84fa9734f50454067a83e419bf951c0865ac22e7360454067b48c6b35f251c0040852fcbd6e45400bc40b6af1e851c0baafaee19f7a4540d340af2e2bde51c020627ba8a08345401578d8204fd251c051ccc3026589454022769294d5c551c0c6cdb97cb28b4540ec7b42973db951c0a1e19102728a4540881b305d07ad51c06c4685d5b085454044bc61a4aea151c06bd04fe39f7d45402bdf9c61a59751c05694f98c9172454039f8e3034f8f51c088728f01f664454015421e8bfc8851c0966d176556554540cecc699ae98451c020b6d2094f44454059ef22993a8351c0f6cd0909893245401662e8e1fb8351c014f27f89b3204540649900ef218751c0b28861fd7c0f4540'::bytea));
