path.out
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:2k
- QUERY: CREATE TABLE PATH_TBL (f1 path);
- QUERY: INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)]');
- QUERY: INSERT INTO PATH_TBL VALUES ('((1,2),(3,4))');
- QUERY: INSERT INTO PATH_TBL VALUES ('[(0,0),(3,0),(4,5),(1,6)]');
- QUERY: INSERT INTO PATH_TBL VALUES ('((1,2),(3,4))');
- QUERY: INSERT INTO PATH_TBL VALUES ('1,2 ,3,4');
- QUERY: INSERT INTO PATH_TBL VALUES ('[1,2,3, 4]');
- QUERY: INSERT INTO PATH_TBL VALUES ('[11,12,13,14]');
- QUERY: INSERT INTO PATH_TBL VALUES ('(11,12,13,14)');
- QUERY: INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]');
- ERROR: Bad path external representation '[(,2),(3,4)]'
- QUERY: INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)');
- ERROR: Bad path external representation '[(1,2),(3,4)'
- QUERY: SELECT f1 FROM PATH_TBL;
- f1
- -------------------------
- [(1,2),(3,4)]
- ((1,2),(3,4))
- [(0,0),(3,0),(4,5),(1,6)]
- ((1,2),(3,4))
- ((1,2),(3,4))
- [(1,2),(3,4)]
- [(11,12),(13,14)]
- ((11,12),(13,14))
- (8 rows)
- QUERY: SELECT '' AS count, f1 AS open_path FROM PATH_TBL WHERE isopen(f1);
- count|open_path
- -----+-------------------------
- |[(1,2),(3,4)]
- |[(0,0),(3,0),(4,5),(1,6)]
- |[(1,2),(3,4)]
- |[(11,12),(13,14)]
- (4 rows)
- QUERY: SELECT '' AS count, f1 AS closed_path FROM PATH_TBL WHERE isclosed(f1);
- count|closed_path
- -----+-----------------
- |((1,2),(3,4))
- |((1,2),(3,4))
- |((1,2),(3,4))
- |((11,12),(13,14))
- (4 rows)
- QUERY: SELECT '' AS count, pclose(f1) AS closed_path FROM PATH_TBL;
- count|closed_path
- -----+-------------------------
- |((1,2),(3,4))
- |((1,2),(3,4))
- |((0,0),(3,0),(4,5),(1,6))
- |((1,2),(3,4))
- |((1,2),(3,4))
- |((1,2),(3,4))
- |((11,12),(13,14))
- |((11,12),(13,14))
- (8 rows)
- QUERY: SELECT '' AS count, popen(f1) AS open_path FROM PATH_TBL;
- count|open_path
- -----+-------------------------
- |[(1,2),(3,4)]
- |[(1,2),(3,4)]
- |[(0,0),(3,0),(4,5),(1,6)]
- |[(1,2),(3,4)]
- |[(1,2),(3,4)]
- |[(1,2),(3,4)]
- |[(11,12),(13,14)]
- |[(11,12),(13,14)]
- (8 rows)