> 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

Confirmed:
        
        test=> select substring('Thomas' from 2 for 3);
         substring 
        -----------
         hom
        (1 row)

Patch applied.  Thanks.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: doc/src/sgml/func.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.62
diff -c -r1.62 func.sgml
*** doc/src/sgml/func.sgml      2001/06/19 22:39:08     1.62
--- doc/src/sgml/func.sgml      2001/07/03 02:40:36
***************
*** 851,857 ****
         </indexterm>
        </entry>
        <entry>substring('Thomas' from 2 for 3)</entry>
!       <entry>oma</entry>
       </row>
  
       <row>
--- 851,857 ----
         </indexterm>
        </entry>
        <entry>substring('Thomas' from 2 for 3)</entry>
!       <entry>hom</entry>
       </row>
  
       <row>

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to