rowcircle.txt file with information for creating tables and rows

-- Create a table with an rciPoint column

 create table tst_Point
 (
        id      integer,
        value   rciPoint
 );

-- Add a row that uses the rciPntIn() function to convert the string 
-- "Row(0,0)" to the rciPnt type

 insert into tst_Point( id, value )
     values ( 0,  "ROW(0,0)");

-- Add another row that explicitly casts ROW(0,1) to the rciPnt type

 insert into tst_Point( id, value )
     values ( 1,  ROW(0,1)::rciPoint );

-- Add a row with a negative element

 insert into tst_Point( id, value )
     values ( 2,  "ROW(0,-1)" );

-- Add a row with a very small element

 insert into tst_Point( id, value )
     values ( 3, "ROW(+5.678E-100,0)" );

-- Add a row with a very precise element

 insert into tst_Point( id, value )
     values (4, "ROW(0,1234567890.12345678)");

-- Make sure the table contains the data you inserted

 select * from tst_Point;
 
-- Find the distance of each point to the origin

 select id, rciDistance("ROW(0,0)", value) from tst_Point;


-- Create a table with an rciCircle column

 create table tst_RCirc
 (
        id      integer,
        value   rciCircle
 );

-- Add some rows

 insert into tst_RCirc(id,value)
     values (0,  "ROW( ROW(0,0),  1.0)");

 insert into tst_RCirc(id,value)
     values (1,  "ROW( ROW(1,0), 0.9)");

 insert into tst_RCirc(id,value)
     values (2,  "ROW( ROW(-1,0), 1.5)");

-- Make sure the table contains the data you inserted

 select * from tst_RCirc;

-- Find which circles contain the origin 

 select id, rciContains(value,"ROW(0,0)") from tst_RCirc order by id;