1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.187 2004/02/22 04:14:06 neilc Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.188 2004/02/27 03:59:23 neilc Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -1003,7 +1003,7 @@ PostgreSQL documentation
1003
1003
<row>
1004
1004
<entry><literal><function>upper</function>(<parameter>string</parameter>)</literal></entry>
1005
1005
<entry><type>text</type></entry>
1006
- <entry>Convert string toupper case </entry>
1006
+ <entry>Convert string touppercase </entry>
1007
1007
<entry><literal>upper('tom')</literal></entry>
1008
1008
<entry><literal>TOM</literal></entry>
1009
1009
</row>
@@ -1033,7 +1033,7 @@ PostgreSQL documentation
1033
1033
<tbody>
1034
1034
<row>
1035
1035
<entry><literal><function>ascii</function>(<type>text</type>)</literal></entry>
1036
- <entry>integer</entry>
1036
+ <entry><type> integer</type> </entry>
1037
1037
<entry><acronym>ASCII</acronym> code of the first character of the argument</entry>
1038
1038
<entry><literal>ascii('x')</literal></entry>
1039
1039
<entry><literal>120</literal></entry>
@@ -1109,16 +1109,20 @@ PostgreSQL documentation
1109
1109
<row>
1110
1110
<entry><literal><function>initcap</function>(<type>text</type>)</literal></entry>
1111
1111
<entry><type>text</type></entry>
1112
- <entry>Convert first letter of each word (whitespace-separated) to upper case</entry>
1113
- <entry><literal>initcap('hi thomas')</literal></entry>
1112
+ <entry>
1113
+ Convert the first letter of each word to uppercase and the
1114
+ rest to lowercase. Words are sequences of alphanumeric
1115
+ characters separated by non-alphanumeric characters.
1116
+ </entry>
1117
+ <entry><literal>initcap('hi THOMAS')</literal></entry>
1114
1118
<entry><literal>Hi Thomas</literal></entry>
1115
1119
</row>
1116
1120
1117
1121
<row>
1118
- <entry><literal><function>length</function>(<parameter>string</parameter>)</literal></entry>
1122
+ <entry><literal><function>length</function>(<parameter>string</parameter> <type>text</type> )</literal></entry>
1119
1123
<entry><type>integer</type></entry>
1120
1124
<entry>
1121
- Number of characters in string
1125
+ Number of characters in<parameter> string</parameter>.
1122
1126
<indexterm>
1123
1127
<primary>character string</primary>
1124
1128
<secondary>length</secondary>
@@ -1139,7 +1143,7 @@ PostgreSQL documentation
1139
1143
<parameter>length</parameter> <type>integer</type>
1140
1144
<optional>, <parameter>fill</parameter> <type>text</type></optional>)</literal>
1141
1145
</entry>
1142
- <entry>text</entry>
1146
+ <entry><type> text</type> </entry>
1143
1147
<entry>
1144
1148
Fill up the <parameter>string</parameter> to length
1145
1149
<parameter>length</parameter> by prepending the characters
@@ -1157,7 +1161,8 @@ PostgreSQL documentation
1157
1161
<entry><type>text</type></entry>
1158
1162
<entry>
1159
1163
Remove the longest string containing only characters from
1160
- <parameter>characters</parameter> from the start of the string.
1164
+ <parameter>characters</parameter> from the start of
1165
+ <parameter>string</parameter>.
1161
1166
</entry>
1162
1167
<entry><literal>ltrim('zzzytrim', 'xyz')</literal></entry>
1163
1168
<entry><literal>trim</literal></entry>
@@ -1167,7 +1172,8 @@ PostgreSQL documentation
1167
1172
<entry><literal><function>md5</function>(<parameter>string</parameter> <type>text</type>)</literal></entry>
1168
1173
<entry><type>text</type></entry>
1169
1174
<entry>
1170
- Calculates the MD5 hash of given string, returning the result in hexadecimal.
1175
+ Calculates the MD5 hash of <parameter>string</parameter>,
1176
+ returning the result in hexadecimal.
1171
1177
</entry>
1172
1178
<entry><literal>md5('abc')</literal></entry>
1173
1179
<entry><literal>900150983cd24fb0 d6963f7d28e17f72</literal></entry>
@@ -1210,9 +1216,10 @@ PostgreSQL documentation
1210
1216
</row>
1211
1217
1212
1218
<row>
1213
- <entry><literal><function>repeat</function>(<type>text</type>, <type>integer</type>)</literal></entry>
1219
+ <entry><literal><function>repeat</function>(<parameter>string</parameter> < type>text</type>, <parameter>number</parameter> <type>integer</type>)</literal></entry>
1214
1220
<entry><type>text</type></entry>
1215
- <entry>Repeat text a number of times</entry>
1221
+ <entry>Repeat <parameter>string</parameter> the specified
1222
+ <parameter>number</parameter> of times</entry>
1216
1223
<entry><literal>repeat('Pg', 4)</literal></entry>
1217
1224
<entry><literal>PgPgPgPg</literal></entry>
1218
1225
</row>
@@ -1253,7 +1260,8 @@ PostgreSQL documentation
1253
1260
<entry><type>text</type></entry>
1254
1261
<entry>
1255
1262
Remove the longest string containing only characters from
1256
- <parameter>characters</parameter> from the end of the string.
1263
+ <parameter>characters</parameter> from the end of
1264
+ <parameter>string</parameter>.
1257
1265
</entry>
1258
1266
<entry><literal>rtrim('trimxxxx', 'x')</literal></entry>
1259
1267
<entry><literal>trim</literal></entry>
@@ -3956,12 +3964,12 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
3956
3964
<row>
3957
3965
<entry><literal>AM</literal> or <literal>A.M.</literal> or
3958
3966
<literal>PM</literal> or <literal>P.M.</literal></entry>
3959
- <entry>meridian indicator (upper case )</entry>
3967
+ <entry>meridian indicator (uppercase )</entry>
3960
3968
</row>
3961
3969
<row>
3962
3970
<entry><literal>am</literal> or <literal>a.m.</literal> or
3963
3971
<literal>pm</literal> or <literal>p.m.</literal></entry>
3964
- <entry>meridian indicator (lower case )</entry>
3972
+ <entry>meridian indicator (lowercase )</entry>
3965
3973
</row>
3966
3974
<row>
3967
3975
<entry><literal>Y,YYY</literal></entry>
@@ -4002,64 +4010,64 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
4002
4010
<row>
4003
4011
<entry><literal>BC</literal> or <literal>B.C.</literal> or
4004
4012
<literal>AD</literal> or <literal>A.D.</literal></entry>
4005
- <entry>era indicator (upper case )</entry>
4013
+ <entry>era indicator (uppercase )</entry>
4006
4014
</row>
4007
4015
<row>
4008
4016
<entry><literal>bc</literal> or <literal>b.c.</literal> or
4009
4017
<literal>ad</literal> or <literal>a.d.</literal></entry>
4010
- <entry>era indicator (lower case )</entry>
4018
+ <entry>era indicator (lowercase )</entry>
4011
4019
</row>
4012
4020
<row>
4013
4021
<entry><literal>MONTH</literal></entry>
4014
- <entry>fullupper-case month name (blank-padded to 9 chars)</entry>
4022
+ <entry>fulluppercase month name (blank-padded to 9 chars)</entry>
4015
4023
</row>
4016
4024
<row>
4017
4025
<entry><literal>Month</literal></entry>
4018
4026
<entry>full mixed-case month name (blank-padded to 9 chars)</entry>
4019
4027
</row>
4020
4028
<row>
4021
4029
<entry><literal>month</literal></entry>
4022
- <entry>fulllower-case month name (blank-padded to 9 chars)</entry>
4030
+ <entry>fulllowercase month name (blank-padded to 9 chars)</entry>
4023
4031
</row>
4024
4032
<row>
4025
4033
<entry><literal>MON</literal></entry>
4026
- <entry>abbreviatedupper-case month name (3 chars)</entry>
4034
+ <entry>abbreviateduppercase month name (3 chars)</entry>
4027
4035
</row>
4028
4036
<row>
4029
4037
<entry><literal>Mon</literal></entry>
4030
4038
<entry>abbreviated mixed-case month name (3 chars)</entry>
4031
4039
</row>
4032
4040
<row>
4033
4041
<entry><literal>mon</literal></entry>
4034
- <entry>abbreviatedlower-case month name (3 chars)</entry>
4042
+ <entry>abbreviatedlowercase month name (3 chars)</entry>
4035
4043
</row>
4036
4044
<row>
4037
4045
<entry><literal>MM</literal></entry>
4038
4046
<entry>month number (01-12)</entry>
4039
4047
</row>
4040
4048
<row>
4041
4049
<entry><literal>DAY</literal></entry>
4042
- <entry>fullupper-case day name (blank-padded to 9 chars)</entry>
4050
+ <entry>fulluppercase day name (blank-padded to 9 chars)</entry>
4043
4051
</row>
4044
4052
<row>
4045
4053
<entry><literal>Day</literal></entry>
4046
4054
<entry>full mixed-case day name (blank-padded to 9 chars)</entry>
4047
4055
</row>
4048
4056
<row>
4049
4057
<entry><literal>day</literal></entry>
4050
- <entry>fulllower-case day name (blank-padded to 9 chars)</entry>
4058
+ <entry>fulllowercase day name (blank-padded to 9 chars)</entry>
4051
4059
</row>
4052
4060
<row>
4053
4061
<entry><literal>DY</literal></entry>
4054
- <entry>abbreviatedupper-case day name (3 chars)</entry>
4062
+ <entry>abbreviateduppercase day name (3 chars)</entry>
4055
4063
</row>
4056
4064
<row>
4057
4065
<entry><literal>Dy</literal></entry>
4058
4066
<entry>abbreviated mixed-case day name (3 chars)</entry>
4059
4067
</row>
4060
4068
<row>
4061
4069
<entry><literal>dy</literal></entry>
4062
- <entry>abbreviatedlower-case day name (3 chars)</entry>
4070
+ <entry>abbreviatedlowercase day name (3 chars)</entry>
4063
4071
</row>
4064
4072
<row>
4065
4073
<entry><literal>DDD</literal></entry>
@@ -4099,19 +4107,19 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
4099
4107
</row>
4100
4108
<row>
4101
4109
<entry><literal>RM</literal></entry>
4102
- <entry>month in Roman numerals (I-XII; I=January) (upper case )</entry>
4110
+ <entry>month in Roman numerals (I-XII; I=January) (uppercase )</entry>
4103
4111
</row>
4104
4112
<row>
4105
4113
<entry><literal>rm</literal></entry>
4106
- <entry>month in Roman numerals (i-xii; i=January) (lower case )</entry>
4114
+ <entry>month in Roman numerals (i-xii; i=January) (lowercase )</entry>
4107
4115
</row>
4108
4116
<row>
4109
4117
<entry><literal>TZ</literal></entry>
4110
- <entry>time-zone name (upper case )</entry>
4118
+ <entry>time-zone name (uppercase )</entry>
4111
4119
</row>
4112
4120
<row>
4113
4121
<entry><literal>tz</literal></entry>
4114
- <entry>time-zone name (lower case )</entry>
4122
+ <entry>time-zone name (lowercase )</entry>
4115
4123
</row>
4116
4124
</tbody>
4117
4125
</tgroup>
@@ -4144,12 +4152,12 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
4144
4152
</row>
4145
4153
<row>
4146
4154
<entry><literal>TH</literal> suffix</entry>
4147
- <entry>upper-case ordinal number suffix</entry>
4155
+ <entry>uppercase ordinal number suffix</entry>
4148
4156
<entry><literal>DDTH</literal></entry>
4149
4157
</row>
4150
4158
<row>
4151
4159
<entry><literal>th</literal> suffix</entry>
4152
- <entry>lower-case ordinal number suffix</entry>
4160
+ <entry>lowercase ordinal number suffix</entry>
4153
4161
<entry><literal>DDth</literal></entry>
4154
4162
</row>
4155
4163
<row>
@@ -6216,7 +6224,7 @@ SELECT TIMESTAMP 'now';
6216
6224
sequence-function call is specified by a text-string argument. To
6217
6225
achieve some compatibility with the handling of ordinary
6218
6226
<acronym>SQL</acronym> names, the sequence functions convert their
6219
- argument tolower case unless the string is double-quoted. Thus
6227
+ argument tolowercase unless the string is double-quoted. Thus
6220
6228
<programlisting>
6221
6229
nextval('foo') <lineannotation>operates on sequence <literal>foo</literal></>
6222
6230
nextval('FOO') <lineannotation>operates on sequence <literal>foo</literal></>