| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
 | .pgaw:Help.f.t insert end \
"String functions\n\n" {title} \
"SQL92 String Functions" {bold} \
" - SQL92 defines string functions with specific syntax. Some of these are implemented using other Postgres functions. The supported string types for SQL92 are char, varchar, and text. 
" {} "
char_length(string)" {bold} " 
	Returns: int4 
	length of string" {} "
character_length(string)" {bold} " 
	Returns: int4 
	length of string" {} " 
lower(string)" {bold} " 
	Returns: string 
	convert string to lower case" {} " 
octet_length(string)" {bold} " 
	Returns: int4 
	storage length of string" {} " 
position(string in string)" {bold} " 
	Returns: int4 
	location of specified substring" {} " 
substring(string \[from int\] \[for int\])" {bold} " 
	Returns: string 
	extract specified substring" {} " 
trim(\[leading|trailing|both\] \[string\] from string)" {bold} " 
	Returns: string 
	trim characters from string" {} " 
upper(text)" {bold} " 
	Returns: text 
	convert text to upper case 
Many additional string functions are available for text, varchar(), and char() types. Some are used internally to implement the SQL92 string functions listed above. 
" {} "PostgreSQL String Functions
char(text)" {bold} " 
	Returns: char 
	convert text to char type 
" {} "char(varchar)" {bold} " 
	Returns: char 
	convert varchar to char type 
" {} "initcap(text)" {bold} " 
	Returns: text 
	first letter of each word to upper case 
" {} "lpad(text,int,text)" {bold} " 
	Returns: text 
	left pad string to specified length 
" {} "ltrim(text,text)" {bold} " 
	Returns: text 
	left trim characters from text 
" {} "textpos(text,text)" {bold} " 
	Returns:text 
	locate specified substring 
" {} "rpad(text,int,text)" {bold} "
	Returns: text
	right pad string to specified length 
" {} "rtrim(text,text)" {bold} " 
	Returns: text 
	right trim characters from text 
" {} "substr(text,int\[,int\])" {bold} " 
	Returns: text 
	extract specified substring 
" {} "text(char)" {bold} " 
	Returns: text 
	convert char to text type 
" {} "text(varchar)" {bold} " 
	Returns: text 
	convert varchar to text type 
" {} "translate(text,from,to)" {bold} " 
	Returns: text 
	convert character in string 
" {} "varchar(char)" {bold} " 
	Returns: varchar 
	convert char to varchar type 
" {} "varchar(text)" {bold} " 
	Returns: varchar 
	convert text to varchar type 
Most functions explicitly defined for text will work for char() and varchar() arguments. 
" {} \
"PostgreSQL functions\n" {link pgfunctions} \
"Next - Date/Time functions" {link datefunc}
 |