The above query in Postgres returns expected result for val1 ('ab') but for val2 and val3, it returns 'a' and '' respectively. Oracle and most of other RDBMS systems would return 'ab' for val1 and val2. When the start position is -ve, then the start position will be considered from end of input string. The start position can be considered either as 0 or 1 and substring from that position can be returned by considering the max length of the input string, which is logically correct. But when -ve value given for start position and returning empty string '', which does not seem logically correct. Kindly consider this case and let me know your thoughts.