Pushker Chaubey <pchaubey@vertex.co.in> writes:
> (Please note that I just replaced similar to with ~*)
They're not the same ... SIMILAR TO is SQL-spec which is almost entirely
unlike POSIX.
You can get there using the undocumented similar_escape function:
"a SIMILAR TO b" is actually implemented as "a ~ similar_escape(b,null)",
so "a ~* similar_escape(b,null)" should do what you want.
regards, tom lane