Augment info on string functions per Jose Soares' suggestions.
authorThomas G. Lockhart
Tue, 19 Jan 1999 16:11:18 +0000 (16:11 +0000)
committerThomas G. Lockhart
Tue, 19 Jan 1999 16:11:18 +0000 (16:11 +0000)
doc/src/sgml/func.sgml

index f0381b51ecaf1240e881ccdead8482dcb93731e3..f6b640c1b863dc1a04d56d2f5217d58e7778220d 100644 (file)
@@ -65,54 +65,86 @@ available through operators and may be documented as operators only.
 
 
 
-
-String Functions
+  
+   String Functions
 
-
-SQL92 defines string functions with specific syntax. Some of these
-are implemented using other Postgres functions.
-
+   
+    SQL92 defines string functions with specific syntax. Some of these
+    are implemented using other Postgres functions.
+    The supported string types for SQL92 are
+    charvarchar, and text.
+   
 
-
-
-<Acronym>SQL92</Acronym> String Functions
-
-
-  
-    Function
-    Returns
-    Description
-    Example
-  
-
-
-  
- position(text in text) 
- int4 
- location of specified substring 
- position('o' in 'Tom') 
-  
-  
- substring(text [from int] [for int]) 
- text 
- extract specified substring 
- substring('Tom' from 2 for 2) 
-  
-  
- trim([leading|trailing|both] [text] from text) 
- text 
- trim characters from text 
- trim(both 'x' from 'xTomx') 
-  
-
-
-
-
+   
+    
+     <Acronym>SQL92</Acronym> String Functions
+     
+      
+       
+   Function
+   Returns
+   Description
+   Example
+       
+      
+      
+       
+    char_length(string) 
+    int4 
+    length of string 
+    char_length('jose') 
+       
+       
+    character_length(string) 
+    int4 
+    length of string 
+    char_length('jose') 
+       
+       
+    lower(string) 
+    string 
+    convert string to lower case 
+    lower('TOM') 
+       
+       
+    octet_length(string) 
+    int4 
+    storage length of string 
+    octet_length('jose') 
+       
+       
+    position(string in string) 
+    int4 
+    location of specified substring 
+    position('o' in 'Tom') 
+       
+       
+    substring(string [from int] [for int]) 
+    string 
+    extract specified substring 
+    substring('Tom' from 2 for 2) 
+       
+       
+    trim([leading|trailing|both] [string] from string) 
+    string 
+    trim characters from string 
+    trim(both 'x' from 'xTomx') 
+       
+       
+    upper(text) 
+    text 
+    convert text to upper case 
+    upper('tom') 
+       
+      
+     
+    
+   
 
-
-Many string functions are available for text, varchar(), and char() types.
-Some are used internally to implement the SQL92 string functions listed above.
-
+   
+    Many additional string functions are available for text, varchar(), and char() types.
+    Some are used internally to implement the SQL92 string functions listed above.
+   
 
 
 
@@ -146,12 +178,6 @@ Some are used internally to implement the SQL92 string functions listed above.
  initcap('thomas') 
   
   
- lower(text) 
- text 
- convert text to lower case 
- lower('TOM') 
-  
-  
  lpad(text,int,text) 
  text 
  left pad string to specified length 
@@ -164,9 +190,9 @@ Some are used internally to implement the SQL92 string functions listed above.
  ltrim('xxxxtrim','x') 
   
   
- position(text,text) 
+ textpos(text,text) 
  text 
- extract specified substring 
+ locate specified substring 
  position('high','ig') 
   
   
@@ -217,12 +243,6 @@ Some are used internally to implement the SQL92 string functions listed above.
  convert text to varchar type 
  varchar('text string') 
   
-  
- upper(text) 
- text 
- convert text to upper case 
- upper('tom') 
-  
 
 
 
@@ -689,3 +709,19 @@ support functions.
 
 
 
+