geometry-i386-netbsd.out
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:23k
源码类别:

数据库系统

开发平台:

Unix_Linux

  1. QUERY: SELECT '' AS four, center(f1) AS center
  2.    FROM BOX_TBL;
  3. four|center 
  4. ----+-------
  5.     |(1,1)  
  6.     |(2,2)  
  7.     |(2.5,3)
  8.     |(3,3)  
  9. (4 rows)
  10. QUERY: SELECT '' AS four, (@@ f1) AS center
  11.    FROM BOX_TBL;
  12. four|center 
  13. ----+-------
  14.     |(1,1)  
  15.     |(2,2)  
  16.     |(2.5,3)
  17.     |(3,3)  
  18. (4 rows)
  19. QUERY: SELECT '' AS six, point(f1) AS center
  20.    FROM CIRCLE_TBL;
  21. six|center   
  22. ---+---------
  23.    |(0,0)    
  24.    |(1,2)    
  25.    |(1,3)    
  26.    |(1,2)    
  27.    |(100,200)
  28.    |(100,0)  
  29. (6 rows)
  30. QUERY: SELECT '' AS six, (@@ f1) AS center
  31.    FROM CIRCLE_TBL;
  32. six|center   
  33. ---+---------
  34.    |(0,0)    
  35.    |(1,2)    
  36.    |(1,3)    
  37.    |(1,2)    
  38.    |(100,200)
  39.    |(100,0)  
  40. (6 rows)
  41. QUERY: SELECT '' AS two, (@@ f1) AS center
  42.    FROM POLYGON_TBL
  43.    WHERE (# f1) > 2;
  44. two|center                             
  45. ---+-----------------------------------
  46.    |(1.33333333333333,1.33333333333333)
  47.    |(2.33333333333333,1.33333333333333)
  48. (2 rows)
  49. QUERY: SELECT '' AS two, p1.f1
  50.    FROM POINT_TBL p1
  51.    WHERE ishorizontal(p1.f1, '(0,0)'::point);
  52. two|f1     
  53. ---+-------
  54.    |(0,0)  
  55.    |(-10,0)
  56. (2 rows)
  57. QUERY: SELECT '' AS two, p1.f1
  58.    FROM POINT_TBL p1
  59.    WHERE p1.f1 ?- '(0,0)'::point;
  60. two|f1     
  61. ---+-------
  62.    |(0,0)  
  63.    |(-10,0)
  64. (2 rows)
  65. QUERY: SELECT '' AS one, p1.f1
  66.    FROM POINT_TBL p1
  67.    WHERE isvertical(p1.f1, '(5.1,34.5)'::point);
  68. one|f1        
  69. ---+----------
  70.    |(5.1,34.5)
  71. (1 row)
  72. QUERY: SELECT '' AS one, p1.f1
  73.    FROM POINT_TBL p1
  74.    WHERE p1.f1 ?| '(5.1,34.5)'::point;
  75. one|f1        
  76. ---+----------
  77.    |(5.1,34.5)
  78. (1 row)
  79. QUERY: SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection
  80.    FROM LSEG_TBL l, POINT_TBL p;
  81. ERROR:  Unable to identify an operator '#' for types 'lseg' and 'point'
  82. You will have to retype this query using an explicit cast
  83. QUERY: SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest
  84.    FROM LSEG_TBL l, POINT_TBL p;
  85. thirty|f1        |s                            |closest                              
  86. ------+----------+-----------------------------+-------------------------------------
  87.       |(0,0)     |[(1,2),(3,4)]                |(1,2)                                
  88.       |(-10,0)   |[(1,2),(3,4)]                |(1,2)                                
  89.       |(-3,4)    |[(1,2),(3,4)]                |(1,2)                                
  90.       |(5.1,34.5)|[(1,2),(3,4)]                |(3,4)                                
  91.       |(-5,-12)  |[(1,2),(3,4)]                |(1,2)                                
  92.       |(10,10)   |[(1,2),(3,4)]                |(3,4)                                
  93.       |(0,0)     |[(0,0),(6,6)]                |(0,0)                                
  94.       |(-10,0)   |[(0,0),(6,6)]                |(0,0)                                
  95.       |(-3,4)    |[(0,0),(6,6)]                |(0.5,0.5)                            
  96.       |(5.1,34.5)|[(0,0),(6,6)]                |(6,6)                                
  97.       |(-5,-12)  |[(0,0),(6,6)]                |(0,0)                                
  98.       |(10,10)   |[(0,0),(6,6)]                |(6,6)                                
  99.       |(0,0)     |[(10,-10),(-3,-4)]           |(-2.04878048780488,-4.4390243902439) 
  100.       |(-10,0)   |[(10,-10),(-3,-4)]           |(-3,-4)                              
  101.       |(-3,4)    |[(10,-10),(-3,-4)]           |(-3,-4)                              
  102.       |(5.1,34.5)|[(10,-10),(-3,-4)]           |(-3,-4)                              
  103.       |(-5,-12)  |[(10,-10),(-3,-4)]           |(-1.60487804878049,-4.64390243902439)
  104.       |(10,10)   |[(10,-10),(-3,-4)]           |(2.39024390243902,-6.48780487804878) 
  105.       |(0,0)     |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264) 
  106.       |(-10,0)   |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472) 
  107.       |(-3,4)    |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303) 
  108.       |(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925)  
  109.       |(-5,-12)  |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616) 
  110.       |(10,10)   |[(-1000000,200),(300000,-40)]|(10.000993741978,15.3827690473092)   
  111.       |(0,0)     |[(11,22),(33,44)]            |(11,22)                              
  112.       |(-10,0)   |[(11,22),(33,44)]            |(11,22)                              
  113.       |(-3,4)    |[(11,22),(33,44)]            |(11,22)                              
  114.       |(5.1,34.5)|[(11,22),(33,44)]            |(14.3,25.3)                          
  115.       |(-5,-12)  |[(11,22),(33,44)]            |(11,22)                              
  116.       |(10,10)   |[(11,22),(33,44)]            |(11,22)                              
  117. (30 rows)
  118. QUERY: SELECT '' as six, box(f1) AS box FROM CIRCLE_TBL;
  119. six|box                                                                       
  120. ---+--------------------------------------------------------------------------
  121.    |(2.12132034355964,2.12132034355964),(-2.12132034355964,-2.12132034355964) 
  122.    |(71.7106781186547,72.7106781186547),(-69.7106781186547,-68.7106781186547) 
  123.    |(4.53553390593274,6.53553390593274),(-2.53553390593274,-0.535533905932737)
  124.    |(3.12132034355964,4.12132034355964),(-1.12132034355964,-0.121320343559642)
  125.    |(107.071067811865,207.071067811865),(92.9289321881345,192.928932188135)   
  126.    |(170.710678118655,70.7106781186547),(29.2893218813453,-70.7106781186547)  
  127. (6 rows)
  128. QUERY: SELECT '' AS twentyfour, b.f1 + p.f1 AS translation
  129.    FROM BOX_TBL b, POINT_TBL p;
  130. twentyfour|translation            
  131. ----------+-----------------------
  132.           |(2,2),(0,0)            
  133.           |(3,3),(1,1)            
  134.           |(2.5,3.5),(2.5,2.5)    
  135.           |(3,3),(3,3)            
  136.           |(-8,2),(-10,0)         
  137.           |(-7,3),(-9,1)          
  138.           |(-7.5,3.5),(-7.5,2.5)  
  139.           |(-7,3),(-7,3)          
  140.           |(-1,6),(-3,4)          
  141.           |(0,7),(-2,5)           
  142.           |(-0.5,7.5),(-0.5,6.5)  
  143.           |(0,7),(0,7)            
  144.           |(7.1,36.5),(5.1,34.5)  
  145.           |(8.1,37.5),(6.1,35.5)  
  146.           |(7.6,38),(7.6,37)      
  147.           |(8.1,37.5),(8.1,37.5)  
  148.           |(-3,-10),(-5,-12)      
  149.           |(-2,-9),(-4,-11)       
  150.           |(-2.5,-8.5),(-2.5,-9.5)
  151.           |(-2,-9),(-2,-9)        
  152.           |(12,12),(10,10)        
  153.           |(13,13),(11,11)        
  154.           |(12.5,13.5),(12.5,12.5)
  155.           |(13,13),(13,13)        
  156. (24 rows)
  157. QUERY: SELECT '' AS twentyfour, b.f1 - p.f1 AS translation
  158.    FROM BOX_TBL b, POINT_TBL p;
  159. twentyfour|translation              
  160. ----------+-------------------------
  161.           |(2,2),(0,0)              
  162.           |(3,3),(1,1)              
  163.           |(2.5,3.5),(2.5,2.5)      
  164.           |(3,3),(3,3)              
  165.           |(12,2),(10,0)            
  166.           |(13,3),(11,1)            
  167.           |(12.5,3.5),(12.5,2.5)    
  168.           |(13,3),(13,3)            
  169.           |(5,-2),(3,-4)            
  170.           |(6,-1),(4,-3)            
  171.           |(5.5,-0.5),(5.5,-1.5)    
  172.           |(6,-1),(6,-1)            
  173.           |(-3.1,-32.5),(-5.1,-34.5)
  174.           |(-2.1,-31.5),(-4.1,-33.5)
  175.           |(-2.6,-31),(-2.6,-32)    
  176.           |(-2.1,-31.5),(-2.1,-31.5)
  177.           |(7,14),(5,12)            
  178.           |(8,15),(6,13)            
  179.           |(7.5,15.5),(7.5,14.5)    
  180.           |(8,15),(8,15)            
  181.           |(-8,-8),(-10,-10)        
  182.           |(-7,-7),(-9,-9)          
  183.           |(-7.5,-6.5),(-7.5,-7.5)  
  184.           |(-7,-7),(-7,-7)          
  185. (24 rows)
  186. QUERY: SELECT '' AS twentyfour, b.f1 * p.f1 AS rotation
  187.    FROM BOX_TBL b, POINT_TBL p;
  188. twentyfour|rotation                   
  189. ----------+---------------------------
  190.           |(0,0),(0,0)                
  191.           |(0,0),(0,0)                
  192.           |(0,0),(0,0)                
  193.           |(0,0),(0,0)                
  194.           |(0,0),(-20,-20)            
  195.           |(-10,-10),(-30,-30)        
  196.           |(-25,-25),(-25,-35)        
  197.           |(-30,-30),(-30,-30)        
  198.           |(0,2),(-14,0)              
  199.           |(-7,3),(-21,1)             
  200.           |(-17.5,2.5),(-21.5,-0.5)   
  201.           |(-21,3),(-21,3)            
  202.           |(0,79.2),(-58.8,0)         
  203.           |(-29.4,118.8),(-88.2,39.6) 
  204.           |(-73.5,104.1),(-108,99)    
  205.           |(-88.2,118.8),(-88.2,118.8)
  206.           |(14,0),(0,-34)             
  207.           |(21,-17),(7,-51)           
  208.           |(29.5,-42.5),(17.5,-47.5)  
  209.           |(21,-51),(21,-51)          
  210.           |(0,40),(0,0)               
  211.           |(0,60),(0,20)              
  212.           |(0,60),(-10,50)            
  213.           |(0,60),(0,60)              
  214. (24 rows)
  215. QUERY: SELECT '' AS twenty, b.f1 / p.f1 AS rotation
  216.    FROM BOX_TBL b, POINT_TBL p
  217.    WHERE (p.f1 <-> '(0,0)'::point) >= 1;
  218. twenty|rotation                                                                         
  219. ------+---------------------------------------------------------------------------------
  220.       |(0,0),(-0.2,-0.2)                                                                
  221.       |(-0.1,-0.1),(-0.3,-0.3)                                                          
  222.       |(-0.25,-0.25),(-0.25,-0.35)                                                      
  223.       |(-0.3,-0.3),(-0.3,-0.3)                                                          
  224.       |(0.08,0),(0,-0.56)                                                               
  225.       |(0.12,-0.28),(0.04,-0.84)                                                        
  226.       |(0.26,-0.7),(0.1,-0.82)                                                          
  227.       |(0.12,-0.84),(0.12,-0.84)                                                        
  228.       |(0.0651176557643925,0),(0,-0.0483449262493217)                                   
  229.       |(0.0976764836465887,-0.0241724631246608),(0.0325588278821962,-0.0725173893739825)
  230.       |(0.109762715208919,-0.0562379754328844),(0.0813970697054906,-0.0604311578116521) 
  231.       |(0.0976764836465887,-0.0725173893739825),(0.0976764836465887,-0.0725173893739825)
  232.       |(0,0.0828402366863905),(-0.201183431952663,0)                                    
  233.       |(-0.100591715976331,0.124260355029586),(-0.301775147928994,0.0414201183431953)   
  234.       |(-0.251479289940828,0.103550295857988),(-0.322485207100592,0.0739644970414201)   
  235.       |(-0.301775147928994,0.124260355029586),(-0.301775147928994,0.124260355029586)    
  236.       |(0.2,0),(0,0)                                                                    
  237.       |(0.3,0),(0.1,0)                                                                  
  238.       |(0.3,0.05),(0.25,0)                                                              
  239.       |(0.3,0),(0.3,0)                                                                  
  240. (20 rows)
  241. QUERY: SET geqo TO 'off';
  242. QUERY: SELECT '' AS eight, points(f1) AS npoints, f1 AS path FROM PATH_TBL;
  243. eight|npoints|path                     
  244. -----+-------+-------------------------
  245.      |      2|[(1,2),(3,4)]            
  246.      |      2|((1,2),(3,4))            
  247.      |      4|[(0,0),(3,0),(4,5),(1,6)]
  248.      |      2|((1,2),(3,4))            
  249.      |      2|((1,2),(3,4))            
  250.      |      2|[(1,2),(3,4)]            
  251.      |      2|[(11,12),(13,14)]        
  252.      |      2|((11,12),(13,14))        
  253. (8 rows)
  254. QUERY: SELECT '' AS four, path(f1) FROM POLYGON_TBL;
  255. four|path               
  256. ----+-------------------
  257.     |((2,0),(2,4),(0,0))
  258.     |((3,1),(3,3),(1,0))
  259.     |((0,0))            
  260.     |((0,1),(0,1))      
  261. (4 rows)
  262. QUERY: SELECT '' AS eight, p1.f1 + '(10,10)'::point AS dist_add
  263.    FROM PATH_TBL p1;
  264. eight|dist_add                         
  265. -----+---------------------------------
  266.      |[(11,12),(13,14)]                
  267.      |((11,12),(13,14))                
  268.      |[(10,10),(13,10),(14,15),(11,16)]
  269.      |((11,12),(13,14))                
  270.      |((11,12),(13,14))                
  271.      |[(11,12),(13,14)]                
  272.      |[(21,22),(23,24)]                
  273.      |((21,22),(23,24))                
  274. (8 rows)
  275. QUERY: SELECT '' AS eight, p1.f1 * '(2,-1)'::point AS dist_mul
  276.    FROM PATH_TBL p1;
  277. eight|dist_mul                    
  278. -----+----------------------------
  279.      |[(4,3),(10,5)]              
  280.      |((4,3),(10,5))              
  281.      |[(0,0),(6,-3),(13,6),(8,11)]
  282.      |((4,3),(10,5))              
  283.      |((4,3),(10,5))              
  284.      |[(4,3),(10,5)]              
  285.      |[(34,13),(40,15)]           
  286.      |((34,13),(40,15))           
  287. (8 rows)
  288. QUERY: RESET geqo;
  289. QUERY: SELECT '' AS twentyfour, p.f1, poly.f1, poly.f1 ~ p.f1 AS contains
  290.    FROM POLYGON_TBL poly, POINT_TBL p;
  291. twentyfour|f1        |f1                 |contains
  292. ----------+----------+-------------------+--------
  293.           |(0,0)     |((2,0),(2,4),(0,0))|t       
  294.           |(-10,0)   |((2,0),(2,4),(0,0))|f       
  295.           |(-3,4)    |((2,0),(2,4),(0,0))|f       
  296.           |(5.1,34.5)|((2,0),(2,4),(0,0))|f       
  297.           |(-5,-12)  |((2,0),(2,4),(0,0))|f       
  298.           |(10,10)   |((2,0),(2,4),(0,0))|f       
  299.           |(0,0)     |((3,1),(3,3),(1,0))|f       
  300.           |(-10,0)   |((3,1),(3,3),(1,0))|f       
  301.           |(-3,4)    |((3,1),(3,3),(1,0))|f       
  302.           |(5.1,34.5)|((3,1),(3,3),(1,0))|f       
  303.           |(-5,-12)  |((3,1),(3,3),(1,0))|f       
  304.           |(10,10)   |((3,1),(3,3),(1,0))|f       
  305.           |(0,0)     |((0,0))            |t       
  306.           |(-10,0)   |((0,0))            |f       
  307.           |(-3,4)    |((0,0))            |f       
  308.           |(5.1,34.5)|((0,0))            |f       
  309.           |(-5,-12)  |((0,0))            |f       
  310.           |(10,10)   |((0,0))            |f       
  311.           |(0,0)     |((0,1),(0,1))      |f       
  312.           |(-10,0)   |((0,1),(0,1))      |f       
  313.           |(-3,4)    |((0,1),(0,1))      |f       
  314.           |(5.1,34.5)|((0,1),(0,1))      |f       
  315.           |(-5,-12)  |((0,1),(0,1))      |f       
  316.           |(10,10)   |((0,1),(0,1))      |f       
  317. (24 rows)
  318. QUERY: SELECT '' AS twentyfour, p.f1, poly.f1, p.f1 @ poly.f1 AS contained
  319.    FROM POLYGON_TBL poly, POINT_TBL p;
  320. twentyfour|f1        |f1                 |contained
  321. ----------+----------+-------------------+---------
  322.           |(0,0)     |((2,0),(2,4),(0,0))|t        
  323.           |(-10,0)   |((2,0),(2,4),(0,0))|f        
  324.           |(-3,4)    |((2,0),(2,4),(0,0))|f        
  325.           |(5.1,34.5)|((2,0),(2,4),(0,0))|f        
  326.           |(-5,-12)  |((2,0),(2,4),(0,0))|f        
  327.           |(10,10)   |((2,0),(2,4),(0,0))|f        
  328.           |(0,0)     |((3,1),(3,3),(1,0))|f        
  329.           |(-10,0)   |((3,1),(3,3),(1,0))|f        
  330.           |(-3,4)    |((3,1),(3,3),(1,0))|f        
  331.           |(5.1,34.5)|((3,1),(3,3),(1,0))|f        
  332.           |(-5,-12)  |((3,1),(3,3),(1,0))|f        
  333.           |(10,10)   |((3,1),(3,3),(1,0))|f        
  334.           |(0,0)     |((0,0))            |t        
  335.           |(-10,0)   |((0,0))            |f        
  336.           |(-3,4)    |((0,0))            |f        
  337.           |(5.1,34.5)|((0,0))            |f        
  338.           |(-5,-12)  |((0,0))            |f        
  339.           |(10,10)   |((0,0))            |f        
  340.           |(0,0)     |((0,1),(0,1))      |f        
  341.           |(-10,0)   |((0,1),(0,1))      |f        
  342.           |(-3,4)    |((0,1),(0,1))      |f        
  343.           |(5.1,34.5)|((0,1),(0,1))      |f        
  344.           |(-5,-12)  |((0,1),(0,1))      |f        
  345.           |(10,10)   |((0,1),(0,1))      |f        
  346. (24 rows)
  347. QUERY: SELECT '' AS four, points(f1) AS npoints, f1 AS polygon
  348.    FROM POLYGON_TBL;
  349. four|npoints|polygon            
  350. ----+-------+-------------------
  351.     |      3|((2,0),(2,4),(0,0))
  352.     |      3|((3,1),(3,3),(1,0))
  353.     |      1|((0,0))            
  354.     |      2|((0,1),(0,1))      
  355. (4 rows)
  356. QUERY: SELECT '' AS four, polygon(f1)
  357.    FROM BOX_TBL;
  358. four|polygon                                  
  359. ----+-----------------------------------------
  360.     |((0,0),(0,2),(2,2),(2,0))                
  361.     |((1,1),(1,3),(3,3),(3,1))                
  362.     |((2.5,2.5),(2.5,3.5),(2.5,3.5),(2.5,2.5))
  363.     |((3,3),(3,3),(3,3),(3,3))                
  364. (4 rows)
  365. QUERY: SELECT '' AS four, polygon(f1)
  366.    FROM PATH_TBL WHERE isclosed(f1);
  367. four|polygon          
  368. ----+-----------------
  369.     |((1,2),(3,4))    
  370.     |((1,2),(3,4))    
  371.     |((1,2),(3,4))    
  372.     |((11,12),(13,14))
  373. (4 rows)
  374. QUERY: SELECT '' AS four, f1 AS open_path, polygon( pclose(f1)) AS polygon
  375.    FROM PATH_TBL
  376.    WHERE isopen(f1);
  377. four|open_path                |polygon                  
  378. ----+-------------------------+-------------------------
  379.     |[(1,2),(3,4)]            |((1,2),(3,4))            
  380.     |[(0,0),(3,0),(4,5),(1,6)]|((0,0),(3,0),(4,5),(1,6))
  381.     |[(1,2),(3,4)]            |((1,2),(3,4))            
  382.     |[(11,12),(13,14)]        |((11,12),(13,14))        
  383. (4 rows)
  384. QUERY: SELECT '' AS six, polygon(f1)
  385.    FROM CIRCLE_TBL;
  386. six|polygon                                                                                                                                                                                                                                                                                                                                                                                    
  387. ---+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  388.    |((-3,0),(-2.59807621135076,1.50000000000442),(-1.49999999999116,2.59807621135842),(1.53102359017709e-11,3),(1.50000000001768,2.59807621134311),(2.59807621136607,1.4999999999779),(3,-3.06204718035418e-11),(2.59807621133545,-1.50000000003094),(1.49999999996464,-2.59807621137373),(-4.59307077053127e-11,-3),(-1.5000000000442,-2.5980762113278),(-2.59807621138138,-1.49999999995138))
  389.    |((-99,2),(-85.6025403783588,52.0000000001473),(-48.9999999997054,88.602540378614),(1.00000000051034,102),(51.0000000005893,88.6025403781036),(87.6025403788692,51.9999999992634),(101,1.99999999897932),(87.6025403778485,-48.0000000010313),(50.9999999988214,-84.6025403791243),(0.999999998468976,-98),(-49.0000000014732,-84.6025403775933),(-85.6025403793795,-47.9999999983795))     
  390.    |((-4,3),(-3.33012701891794,5.50000000000737),(-1.49999999998527,7.3301270189307),(1.00000000002552,8),(3.50000000002946,7.33012701890518),(5.33012701894346,5.49999999996317),(6,2.99999999994897),(5.33012701889242,0.499999999948437),(3.49999999994107,-1.33012701895622),(0.999999999923449,-2),(-1.50000000007366,-1.33012701887967),(-3.33012701896897,0.500000000081028))           
  391.    |((-2,2),(-1.59807621135076,3.50000000000442),(-0.499999999991161,4.59807621135842),(1.00000000001531,5),(2.50000000001768,4.59807621134311),(3.59807621136607,3.4999999999779),(4,1.99999999996938),(3.59807621133545,0.499999999969062),(2.49999999996464,-0.598076211373729),(0.999999999954069,-1),(-0.500000000044197,-0.598076211327799),(-1.59807621138138,0.500000000048616))       
  392.    |((90,200),(91.3397459621641,205.000000000015),(95.0000000000295,208.660254037861),(100.000000000051,210),(105.000000000059,208.66025403781),(108.660254037887,204.999999999926),(110,199.999999999898),(108.660254037785,194.999999999897),(104.999999999882,191.339745962088),(99.9999999998469,190),(94.9999999998527,191.339745962241),(91.3397459620621,195.000000000162))             
  393.    |((0,0),(13.3974596216412,50.0000000001473),(50.0000000002946,86.602540378614),(100.00000000051,100),(150.000000000589,86.6025403781036),(186.602540378869,49.9999999992634),(200,-1.02068239345139e-09),(186.602540377848,-50.0000000010313),(149.999999998821,-86.6025403791243),(99.999999998469,-100),(49.9999999985268,-86.6025403775933),(13.3974596206205,-49.9999999983795))        
  394. (6 rows)
  395. QUERY: SELECT '' AS six, polygon(8, f1)
  396.    FROM CIRCLE_TBL;
  397. six|polygon                                                                                                                                                                                                                                  
  398. ---+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  399.    |((-3,0),(-2.12132034355423,2.12132034356506),(1.53102359017709e-11,3),(2.12132034357588,2.1213203435434),(3,-3.06204718035418e-11),(2.12132034353258,-2.12132034358671),(-4.59307077053127e-11,-3),(-2.12132034359753,-2.12132034352175))
  400.    |((-99,2),(-69.7106781184743,72.7106781188352),(1.00000000051034,102),(71.710678119196,72.7106781181135),(101,1.99999999897932),(71.7106781177526,-68.7106781195569),(0.999999998468976,-98),(-69.7106781199178,-68.7106781173917))       
  401.    |((-4,3),(-2.53553390592372,6.53553390594176),(1.00000000002552,8),(4.5355339059598,6.53553390590567),(6,2.99999999994897),(4.53553390588763,-0.535533905977846),(0.999999999923449,-2),(-2.53553390599589,-0.535533905869586))           
  402.    |((-2,2),(-1.12132034355423,4.12132034356506),(1.00000000001531,5),(3.12132034357588,4.1213203435434),(4,1.99999999996938),(3.12132034353258,-0.121320343586707),(0.999999999954069,-1),(-1.12132034359753,-0.121320343521752))           
  403.    |((90,200),(92.9289321881526,207.071067811884),(100.000000000051,210),(107.07106781192,207.071067811811),(110,199.999999999898),(107.071067811775,192.928932188044),(99.9999999998469,190),(92.9289321880082,192.928932188261))           
  404.    |((0,0),(29.2893218815257,70.7106781188352),(100.00000000051,100),(170.710678119196,70.7106781181135),(200,-1.02068239345139e-09),(170.710678117753,-70.7106781195569),(99.999999998469,-100),(29.2893218800822,-70.7106781173917))       
  405. (6 rows)
  406. QUERY: SELECT '' AS six, circle(f1, 50.0)
  407.    FROM POINT_TBL;
  408. six|circle         
  409. ---+---------------
  410.    |<(0,0),50>     
  411.    |<(-10,0),50>   
  412.    |<(-3,4),50>    
  413.    |<(5.1,34.5),50>
  414.    |<(-5,-12),50>  
  415.    |<(10,10),50>   
  416. (6 rows)
  417. QUERY: SELECT '' AS four, circle(f1)
  418.    FROM BOX_TBL;
  419. four|circle                 
  420. ----+-----------------------
  421.     |<(1,1),1.4142135623731>
  422.     |<(2,2),1.4142135623731>
  423.     |<(2.5,3),0.5>          
  424.     |<(3,3),0>              
  425. (4 rows)
  426. QUERY: SELECT '' AS two, circle(f1)
  427.    FROM POLYGON_TBL
  428.    WHERE (# f1) >= 3;
  429. two|circle                                                
  430. ---+------------------------------------------------------
  431.    |<(1.33333333333333,1.33333333333333),2.04168905063636>
  432.    |<(2.33333333333333,1.33333333333333),1.47534300379185>
  433. (2 rows)
  434. QUERY: SELECT '' AS twentyfour, c1.f1 AS circle, p1.f1 AS point, (p1.f1 <-> c1.f1) AS distance
  435.    FROM CIRCLE_TBL c1, POINT_TBL p1
  436.    WHERE (p1.f1 <-> c1.f1) > 0
  437.    ORDER BY distance, circle, point using <<;
  438. twentyfour|circle        |point     |        distance
  439. ----------+--------------+----------+----------------
  440.           |<(100,0),100> |(5.1,34.5)|0.97653192697797
  441.           |<(1,2),3>     |(-3,4)    |1.47213595499958
  442.           |<(0,0),3>     |(-3,4)    |               2
  443.           |<(100,0),100> |(-3,4)    |3.07764064044152
  444.           |<(100,0),100> |(-5,-12)  |5.68348972285122
  445.           |<(1,3),5>     |(-10,0)   |6.40175425099138
  446.           |<(1,3),5>     |(10,10)   |6.40175425099138
  447.           |<(0,0),3>     |(-10,0)   |               7
  448.           |<(1,2),3>     |(-10,0)   |8.18033988749895
  449.           |<(1,2),3>     |(10,10)   | 9.0415945787923
  450.           |<(0,0),3>     |(-5,-12)  |              10
  451.           |<(100,0),100> |(-10,0)   |              10
  452.           |<(0,0),3>     |(10,10)   | 11.142135623731
  453.           |<(1,3),5>     |(-5,-12)  |11.1554944214035
  454.           |<(1,2),3>     |(-5,-12)  |12.2315462117278
  455.           |<(1,3),5>     |(5.1,34.5)|26.7657047773223
  456.           |<(1,2),3>     |(5.1,34.5)| 29.757594539282
  457.           |<(0,0),3>     |(5.1,34.5)|31.8749193547455
  458.           |<(100,200),10>|(5.1,34.5)|180.778038568384
  459.           |<(100,200),10>|(10,10)   |200.237960416286
  460.           |<(100,200),10>|(-3,4)    |211.415898254845
  461.           |<(100,200),10>|(0,0)     |213.606797749979
  462.           |<(100,200),10>|(-10,0)   |218.254244210267
  463.           |<(100,200),10>|(-5,-12)  |226.577682802077
  464. (24 rows)