RE: http://www.postgresql.org/idocs/index.php?functions-string.html
In Table 4-6. SQL String Functions and Operators
FUNCTION RETURN TYPE DESC
...
substring( text extract
string substring
[from integer]
[for integer])
EXAMPLE RESULT
substring('Thomas' oma
from 2 for 3)
...
The result should be 'hom' instead of 'oma':
1 2 3 4 5 6
T h o m a s
from 1 2
^-------^
for 1 2 3