Constantin Teodorescu <teo@flex.ro> writes:
> select * from regdemo where fld1 ~* '^41|^des';
> fld1
> ----
> (0 rows)
> ^^^^^^^^^^^^^^
> !?!?!?!
I see it too. Even more interesting is that these variants are OK:
regression=> select * from regdemo where fld1 ~* '^des|^41';
fld1
-----------
410
destination
(2 rows)
regression=> select * from regdemo where fld1 ~* '(^41)|(^des)';
fld1
-----------
410
destination
(2 rows)
And if you want *really* disturbing:
regression=> select * from regdemo where fld1 ~* '^sou|^des';
fld1
-----------
source
destination
(2 rows)
regression=> select * from regdemo where fld1 ~ '^sou|^des';
fld1
----
(0 rows)
Something is rotten in the state of Denmark...
regards, tom lane