Skip to content

Commit

Permalink
Merge pull request #21 from adjust/fix_issue_20
Browse files Browse the repository at this point in the history
Fix issue 20
  • Loading branch information
zilder authored Mar 15, 2021
2 parents 7b70594 + 91f3d23 commit 85e268a
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 153 deletions.
62 changes: 0 additions & 62 deletions .travis.yml

This file was deleted.

46 changes: 46 additions & 0 deletions expected/wltree.out
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ SELECT 'foö::bär::ba@ : 4*'::ltree;
foö::bär::ba@ : 4*
(1 row)

SELECT '::1'::ltree; -- fails
ERROR: syntax error
LINE 1: SELECT '::1'::ltree;
^
DETAIL: Unexpected delimeter in position 0
SELECT '::'::ltree; -- fails
ERROR: syntax error
LINE 1: SELECT '::'::ltree;
^
DETAIL: Unexpected delimeter in position 0
SELECT ltree2text('1::2::3::34::sdf');
ltree2text
------------------
Expand Down Expand Up @@ -497,6 +507,42 @@ SELECT 'foö::bär::ba\@ \: 4\*'::lquery;
foö::bär::ba@ : 4*
(1 row)

SELECT 'a:::'::lquery;
lquery
--------
a:::
(1 row)

SELECT 'a:::b'::lquery;
lquery
--------
a:::b
(1 row)

SELECT '::1'::lquery; -- fails
ERROR: syntax error
LINE 1: SELECT '::1'::lquery;
^
DETAIL: Unexpected delimeter in position 0
SELECT '::'::lquery; -- fails
ERROR: syntax error
LINE 1: SELECT '::'::lquery;
^
DETAIL: Unexpected delimeter in position 0
SELECT '1:2'::lquery;
lquery
--------
1:2
(1 row)

SELECT '*:1'::lquery; -- fails
ERROR: syntax error at position 1: ':'
LINE 1: SELECT '*:1'::lquery;
^
SELECT '*.1'::lquery; -- fails
ERROR: syntax error at position 1: '.'
LINE 1: SELECT '*.1'::lquery;
^
SELECT nlevel('1::2::3::4');
nlevel
--------
Expand Down
1 change: 1 addition & 0 deletions ltree.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "tsearch/ts_locale.h"

#define NODE_DELIMITER_CHAR ':'
#define NODE_DELIMITER_LEN 2
#define ESCAPE_CHAR '\\'

typedef int32 int4;
Expand Down
Loading

0 comments on commit 85e268a

Please sign in to comment.