加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

PostgreSQL学习篇9.11 几何类型

发布时间:2020-12-13 16:59:29 所属栏目:百科 来源:网络整理
导读:集合类型挺复杂,各种操作符各种函数。point :平面中的点line:直线lseg:线段box:矩形path:路径,()表示闭合路径,[]表示开放路径circle:圆等输入:类型名称 '表现形式''表现形式'::类型名称postgres=# select '1,1'::point; point------- (1,1)(1 row)
集合类型挺复杂,各种操作符各种函数。

point :平面中的点
line:直线
lseg:线段
box:矩形
path:路径,()表示闭合路径,[]表示开放路径
circle:圆
等

输入:
类型名称 '表现形式'
'表现形式'::类型名称

postgres=# select '1,1'::point;
 point
-------
 (1,1)
(1 row)

postgres=# select '(1,1)'::point;
 point
-------
 (1,1)
(1 row)

postgres=# select lseg'1,1,2,3';
     lseg     
---------------
 [(1,1),(2,3)]
(1 row)

postgres=# select box'1,4';
     box     
-------------
 (1,4),(1,2)
(1 row)

postgres=# select path'1,3,6,8,9,4,7';
           path           
---------------------------
 ((1,3),(6,8),(9,(4,7))
(1 row)
postgres=# select circle'1,3';
  circle   
-----------
 <(1,2),3>
(1 row)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读