-- this loads the SQL-MM examples listed in the PostGIS documentation
-- (http://www.postgis.org/documentation/manual-1.4/ch04.html#id2758657)

drop table test;

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

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

CREATE TABLE test (
    g geometry,
    id integer NOT NULL
);

INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('CIRCULARSTRING(0 0, 1 1, 1 0)', -1), 1);
INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0)', -1), 2);
INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))', -1), 3);
INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0),(1 1, 3 3, 3 1, 1 1))', -1), 4);
INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.6 0.4, 1.6 0.5, 1.7 1) )', -1), 5);
INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('MULTICURVE((0 0, 5 5),CIRCULARSTRING(4 0, 4 4, 8 4))', -1), 6);
INSERT INTO test ( g, id ) VALUES ( ST_GeomFromText('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0),(1 1, 3 3, 3 1, 1 1)),((10 10, 14 12, 11 10, 10 10),(11 11, 11.5 11, 11 11.5, 11 11)))', -1), 7);

ALTER TABLE ONLY test ADD CONSTRAINT test_pkey PRIMARY KEY (id);