PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
formatting.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * str_tolower (const char *buff, size_t nbytes, Oid collid)
 
char * str_toupper (const char *buff, size_t nbytes, Oid collid)
 
char * str_initcap (const char *buff, size_t nbytes, Oid collid)
 
char * str_casefold (const char *buff, size_t nbytes, Oid collid)
 
char * asc_tolower (const char *buff, size_t nbytes)
 
char * asc_toupper (const char *buff, size_t nbytes)
 
char * asc_initcap (const char *buff, size_t nbytes)
 
Datum parse_datetime (text *date_txt, text *fmt, Oid collid, bool strict, Oid *typid, int32 *typmod, int *tz, struct Node *escontext)
 
bool datetime_format_has_tz (const char *fmt_str)
 

Function Documentation

◆ asc_initcap()

char * asc_initcap ( const char *  buff,
size_t  nbytes 
)

Definition at line 1944 of file formatting.c.

1945{
1946 char *result;
1947 char *p;
1948 int wasalnum = false;
1949
1950 if (!buff)
1951 return NULL;
1952
1953 result = pnstrdup(buff, nbytes);
1954
1955 for (p = result; *p; p++)
1956 {
1957 char c;
1958
1959 if (wasalnum)
1960 *p = c = pg_ascii_tolower((unsigned char) *p);
1961 else
1962 *p = c = pg_ascii_toupper((unsigned char) *p);
1963 /* we don't trust isalnum() here */
1964 wasalnum = ((c >= 'A' && c <= 'Z') ||
1965 (c >= 'a' && c <= 'z') ||
1966 (c >= '0' && c <= '9'));
1967 }
1968
1969 return result;
1970}
char * pnstrdup(const char *in, Size len)
Definition: mcxt.c:2336
unsigned char pg_ascii_tolower(unsigned char ch)
Definition: pgstrcasecmp.c:146
unsigned char pg_ascii_toupper(unsigned char ch)
Definition: pgstrcasecmp.c:135
char * c

References pg_ascii_tolower(), pg_ascii_toupper(), and pnstrdup().

Referenced by str_initcap().

◆ asc_tolower()

char * asc_tolower ( const char *  buff,
size_t  nbytes 
)

Definition at line 1898 of file formatting.c.

1899{
1900 char *result;
1901 char *p;
1902
1903 if (!buff)
1904 return NULL;
1905
1906 result = pnstrdup(buff, nbytes);
1907
1908 for (p = result; *p; p++)
1909 *p = pg_ascii_tolower((unsigned char) *p);
1910
1911 return result;
1912}

References pg_ascii_tolower(), and pnstrdup().

Referenced by asc_tolower_z(), str_casefold(), and str_tolower().

◆ asc_toupper()

char * asc_toupper ( const char *  buff,
size_t  nbytes 
)

Definition at line 1921 of file formatting.c.

1922{
1923 char *result;
1924 char *p;
1925
1926 if (!buff)
1927 return NULL;
1928
1929 result = pnstrdup(buff, nbytes);
1930
1931 for (p = result; *p; p++)
1932 *p = pg_ascii_toupper((unsigned char) *p);
1933
1934 return result;
1935}

References pg_ascii_toupper(), and pnstrdup().

Referenced by asc_toupper_z(), and str_toupper().

◆ datetime_format_has_tz()

bool datetime_format_has_tz ( const char *  fmt_str)

Definition at line 4365 of file formatting.c.

4366{
4367 bool incache;
4368 int fmt_len = strlen(fmt_str);
4369 int result;
4371
4372 if (fmt_len > DCH_CACHE_SIZE)
4373 {
4374 /*
4375 * Allocate new memory if format picture is bigger than static cache
4376 * and do not use cache (call parser always)
4377 */
4378 incache = false;
4379
4380 format = (FormatNode *) palloc((fmt_len + 1) * sizeof(FormatNode));
4381
4383 DCH_suff, DCH_index, DCH_FLAG, NULL);
4384 }
4385 else
4386 {
4387 /*
4388 * Use cache buffers
4389 */
4390 DCHCacheEntry *ent = DCH_cache_fetch(fmt_str, false);
4391
4392 incache = true;
4393 format = ent->format;
4394 }
4395
4396 result = DCH_datetime_type(format);
4397
4398 if (!incache)
4399 pfree(format);
4400
4401 return result & DCH_ZONED;
4402}
static const int DCH_index[KeyWord_INDEX_SIZE]
Definition: formatting.c:974
static void parse_format(FormatNode *node, const char *str, const KeyWord *kw, const KeySuffix *suf, const int *index, uint32 flags, NUMDesc *Num)
Definition: formatting.c:1375
#define DCH_FLAG
Definition: formatting.c:99
static const KeySuffix DCH_suff[]
Definition: formatting.c:594
#define DCH_CACHE_SIZE
Definition: formatting.c:386
#define DCH_ZONED
Definition: formatting.c:1054
static int DCH_datetime_type(FormatNode *node)
Definition: formatting.c:3723
static const KeyWord DCH_keywords[]
Definition: formatting.c:801
static DCHCacheEntry * DCH_cache_fetch(const char *str, bool std)
Definition: formatting.c:3901
void pfree(void *pointer)
Definition: mcxt.c:2150
void * palloc(Size size)
Definition: mcxt.c:1943
static char format
FormatNode format[DCH_CACHE_SIZE+1]
Definition: formatting.c:396

References DCH_cache_fetch(), DCH_CACHE_SIZE, DCH_datetime_type(), DCH_FLAG, DCH_index, DCH_keywords, DCH_suff, DCH_ZONED, DCHCacheEntry::format, format, palloc(), parse_format(), and pfree().

Referenced by jspIsMutableWalker().

◆ parse_datetime()

Datum parse_datetime ( text date_txt,
text fmt,
Oid  collid,
bool  strict,
Oid typid,
int32 typmod,
int *  tz,
struct Node escontext 
)

Definition at line 4202 of file formatting.c.

4205{
4206 struct pg_tm tm;
4207 struct fmt_tz ftz;
4208 fsec_t fsec;
4209 int fprec;
4210 uint32 flags;
4211
4212 if (!do_to_timestamp(date_txt, fmt, collid, strict,
4213 &tm, &fsec, &ftz, &fprec, &flags, escontext))
4214 return (Datum) 0;
4215
4216 *typmod = fprec ? fprec : -1; /* fractional part precision */
4217
4218 if (flags & DCH_DATED)
4219 {
4220 if (flags & DCH_TIMED)
4221 {
4222 if (flags & DCH_ZONED)
4223 {
4224 TimestampTz result;
4225
4226 if (ftz.has_tz)
4227 {
4228 *tz = ftz.gmtoffset;
4229 }
4230 else
4231 {
4232 /*
4233 * Time zone is present in format string, but not in input
4234 * string. Assuming do_to_timestamp() triggers no error
4235 * this should be possible only in non-strict case.
4236 */
4237 Assert(!strict);
4238
4239 ereturn(escontext, (Datum) 0,
4240 (errcode(ERRCODE_INVALID_DATETIME_FORMAT),
4241 errmsg("missing time zone in input string for type timestamptz")));
4242 }
4243
4244 if (tm2timestamp(&tm, fsec, tz, &result) != 0)
4245 ereturn(escontext, (Datum) 0,
4246 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
4247 errmsg("timestamptz out of range")));
4248
4249 AdjustTimestampForTypmod(&result, *typmod, escontext);
4250
4251 *typid = TIMESTAMPTZOID;
4252 return TimestampTzGetDatum(result);
4253 }
4254 else
4255 {
4256 Timestamp result;
4257
4258 if (tm2timestamp(&tm, fsec, NULL, &result) != 0)
4259 ereturn(escontext, (Datum) 0,
4260 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
4261 errmsg("timestamp out of range")));
4262
4263 AdjustTimestampForTypmod(&result, *typmod, escontext);
4264
4265 *typid = TIMESTAMPOID;
4266 return TimestampGetDatum(result);
4267 }
4268 }
4269 else
4270 {
4271 if (flags & DCH_ZONED)
4272 {
4273 ereturn(escontext, (Datum) 0,
4274 (errcode(ERRCODE_INVALID_DATETIME_FORMAT),
4275 errmsg("datetime format is zoned but not timed")));
4276 }
4277 else
4278 {
4279 DateADT result;
4280
4281 /* Prevent overflow in Julian-day routines */
4283 ereturn(escontext, (Datum) 0,
4284 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
4285 errmsg("date out of range: \"%s\"",
4286 text_to_cstring(date_txt))));
4287
4288 result = date2j(tm.tm_year, tm.tm_mon, tm.tm_mday) -
4290
4291 /* Now check for just-out-of-range dates */
4292 if (!IS_VALID_DATE(result))
4293 ereturn(escontext, (Datum) 0,
4294 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
4295 errmsg("date out of range: \"%s\"",
4296 text_to_cstring(date_txt))));
4297
4298 *typid = DATEOID;
4299 return DateADTGetDatum(result);
4300 }
4301 }
4302 }
4303 else if (flags & DCH_TIMED)
4304 {
4305 if (flags & DCH_ZONED)
4306 {
4307 TimeTzADT *result = palloc(sizeof(TimeTzADT));
4308
4309 if (ftz.has_tz)
4310 {
4311 *tz = ftz.gmtoffset;
4312 }
4313 else
4314 {
4315 /*
4316 * Time zone is present in format string, but not in input
4317 * string. Assuming do_to_timestamp() triggers no error this
4318 * should be possible only in non-strict case.
4319 */
4320 Assert(!strict);
4321
4322 ereturn(escontext, (Datum) 0,
4323 (errcode(ERRCODE_INVALID_DATETIME_FORMAT),
4324 errmsg("missing time zone in input string for type timetz")));
4325 }
4326
4327 if (tm2timetz(&tm, fsec, *tz, result) != 0)
4328 ereturn(escontext, (Datum) 0,
4329 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
4330 errmsg("timetz out of range")));
4331
4332 AdjustTimeForTypmod(&result->time, *typmod);
4333
4334 *typid = TIMETZOID;
4335 return TimeTzADTPGetDatum(result);
4336 }
4337 else
4338 {
4339 TimeADT result;
4340
4341 if (tm2time(&tm, fsec, &result) != 0)
4342 ereturn(escontext, (Datum) 0,
4343 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
4344 errmsg("time out of range")));
4345
4346 AdjustTimeForTypmod(&result, *typmod);
4347
4348 *typid = TIMEOID;
4349 return TimeADTGetDatum(result);
4350 }
4351 }
4352 else
4353 {
4354 ereturn(escontext, (Datum) 0,
4355 (errcode(ERRCODE_INVALID_DATETIME_FORMAT),
4356 errmsg("datetime format is not dated and not timed")));
4357 }
4358}
int date2j(int year, int month, int day)
Definition: datetime.c:296
bool AdjustTimestampForTypmod(Timestamp *time, int32 typmod, Node *escontext)
Definition: timestamp.c:368
int tm2timestamp(struct pg_tm *tm, fsec_t fsec, int *tzp, Timestamp *result)
Definition: timestamp.c:2006
uint32_t uint32
Definition: c.h:502
Oid collid
int64 Timestamp
Definition: timestamp.h:38
int64 TimestampTz
Definition: timestamp.h:39
#define IS_VALID_DATE(d)
Definition: timestamp.h:262
int32 fsec_t
Definition: timestamp.h:41
#define IS_VALID_JULIAN(y, m, d)
Definition: timestamp.h:227
#define POSTGRES_EPOCH_JDATE
Definition: timestamp.h:235
int tm2time(struct pg_tm *tm, fsec_t fsec, TimeADT *result)
Definition: date.c:1481
int tm2timetz(struct pg_tm *tm, fsec_t fsec, int tz, TimeTzADT *result)
Definition: date.c:2328
void AdjustTimeForTypmod(TimeADT *time, int32 typmod)
Definition: date.c:1710
static Datum DateADTGetDatum(DateADT X)
Definition: date.h:72
int32 DateADT
Definition: date.h:23
static Datum TimeTzADTPGetDatum(const TimeTzADT *X)
Definition: date.h:84
int64 TimeADT
Definition: date.h:25
static Datum TimeADTGetDatum(TimeADT X)
Definition: date.h:78
int errcode(int sqlerrcode)
Definition: elog.c:854
int errmsg(const char *fmt,...)
Definition: elog.c:1071
#define ereturn(context, dummy_value,...)
Definition: elog.h:277
#define DCH_DATED
Definition: formatting.c:1052
static bool do_to_timestamp(text *date_txt, text *fmt, Oid collid, bool std, struct pg_tm *tm, fsec_t *fsec, struct fmt_tz *tz, int *fprec, uint32 *flags, Node *escontext)
Definition: formatting.c:4428
#define DCH_TIMED
Definition: formatting.c:1053
Assert(PointerIsAligned(start, uint64))
static struct pg_tm tm
Definition: localtime.c:104
uintptr_t Datum
Definition: postgres.h:69
Definition: date.h:28
TimeADT time
Definition: date.h:29
int gmtoffset
Definition: formatting.c:463
Definition: pgtime.h:35
int tm_mday
Definition: pgtime.h:39
int tm_mon
Definition: pgtime.h:40
int tm_year
Definition: pgtime.h:41
static Datum TimestampTzGetDatum(TimestampTz X)
Definition: timestamp.h:52
static Datum TimestampGetDatum(Timestamp X)
Definition: timestamp.h:46
char * text_to_cstring(const text *t)
Definition: varlena.c:225

References AdjustTimeForTypmod(), AdjustTimestampForTypmod(), Assert(), collid, date2j(), DateADTGetDatum(), DCH_DATED, DCH_TIMED, DCH_ZONED, do_to_timestamp(), ereturn, errcode(), errmsg(), fmt_tz::gmtoffset, fmt_tz::has_tz, IS_VALID_DATE, IS_VALID_JULIAN, palloc(), POSTGRES_EPOCH_JDATE, text_to_cstring(), TimeTzADT::time, TimeADTGetDatum(), TimestampGetDatum(), TimestampTzGetDatum(), TimeTzADTPGetDatum(), tm, tm2time(), tm2timestamp(), tm2timetz(), pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.

Referenced by executeDateTimeMethod().

◆ str_casefold()

char * str_casefold ( const char *  buff,
size_t  nbytes,
Oid  collid 
)

Definition at line 1829 of file formatting.c.

1830{
1831 char *result;
1832 pg_locale_t mylocale;
1833
1834 if (!buff)
1835 return NULL;
1836
1837 if (!OidIsValid(collid))
1838 {
1839 /*
1840 * This typically means that the parser could not resolve a conflict
1841 * of implicit collations, so report it that way.
1842 */
1843 ereport(ERROR,
1844 (errcode(ERRCODE_INDETERMINATE_COLLATION),
1845 errmsg("could not determine which collation to use for %s function",
1846 "lower()"),
1847 errhint("Use the COLLATE clause to set the collation explicitly.")));
1848 }
1849
1851 ereport(ERROR,
1852 (errcode(ERRCODE_SYNTAX_ERROR),
1853 errmsg("Unicode case folding can only be performed if server encoding is UTF8")));
1854
1856
1857 /* C/POSIX collations use this path regardless of database encoding */
1858 if (mylocale->ctype_is_c)
1859 {
1860 result = asc_tolower(buff, nbytes);
1861 }
1862 else
1863 {
1864 const char *src = buff;
1865 size_t srclen = nbytes;
1866 size_t dstsize;
1867 char *dst;
1868 size_t needed;
1869
1870 /* first try buffer of equal size plus terminating NUL */
1871 dstsize = srclen + 1;
1872 dst = palloc(dstsize);
1873
1874 needed = pg_strfold(dst, dstsize, src, srclen, mylocale);
1875 if (needed + 1 > dstsize)
1876 {
1877 /* grow buffer if needed and retry */
1878 dstsize = needed + 1;
1879 dst = repalloc(dst, dstsize);
1880 needed = pg_strfold(dst, dstsize, src, srclen, mylocale);
1881 Assert(needed + 1 <= dstsize);
1882 }
1883
1884 Assert(dst[needed] == '\0');
1885 result = dst;
1886 }
1887
1888 return result;
1889}
#define OidIsValid(objectId)
Definition: c.h:746
int errhint(const char *fmt,...)
Definition: elog.c:1318
#define ERROR
Definition: elog.h:39
#define ereport(elevel,...)
Definition: elog.h:149
char * asc_tolower(const char *buff, size_t nbytes)
Definition: formatting.c:1898
int GetDatabaseEncoding(void)
Definition: mbutils.c:1261
void * repalloc(void *pointer, Size size)
Definition: mcxt.c:2170
pg_locale_t pg_newlocale_from_collation(Oid collid)
Definition: pg_locale.c:1188
size_t pg_strfold(char *dst, size_t dstsize, const char *src, ssize_t srclen, pg_locale_t locale)
Definition: pg_locale.c:1313
@ PG_UTF8
Definition: pg_wchar.h:232

References asc_tolower(), Assert(), collid, pg_locale_struct::ctype_is_c, ereport, errcode(), errhint(), errmsg(), ERROR, GetDatabaseEncoding(), OidIsValid, palloc(), pg_newlocale_from_collation(), pg_strfold(), PG_UTF8, and repalloc().

Referenced by casefold().

◆ str_initcap()

char * str_initcap ( const char *  buff,
size_t  nbytes,
Oid  collid 
)

Definition at line 1765 of file formatting.c.

1766{
1767 char *result;
1768 pg_locale_t mylocale;
1769
1770 if (!buff)
1771 return NULL;
1772
1773 if (!OidIsValid(collid))
1774 {
1775 /*
1776 * This typically means that the parser could not resolve a conflict
1777 * of implicit collations, so report it that way.
1778 */
1779 ereport(ERROR,
1780 (errcode(ERRCODE_INDETERMINATE_COLLATION),
1781 errmsg("could not determine which collation to use for %s function",
1782 "initcap()"),
1783 errhint("Use the COLLATE clause to set the collation explicitly.")));
1784 }
1785
1787
1788 /* C/POSIX collations use this path regardless of database encoding */
1789 if (mylocale->ctype_is_c)
1790 {
1791 result = asc_initcap(buff, nbytes);
1792 }
1793 else
1794 {
1795 const char *src = buff;
1796 size_t srclen = nbytes;
1797 size_t dstsize;
1798 char *dst;
1799 size_t needed;
1800
1801 /* first try buffer of equal size plus terminating NUL */
1802 dstsize = srclen + 1;
1803 dst = palloc(dstsize);
1804
1805 needed = pg_strtitle(dst, dstsize, src, srclen, mylocale);
1806 if (needed + 1 > dstsize)
1807 {
1808 /* grow buffer if needed and retry */
1809 dstsize = needed + 1;
1810 dst = repalloc(dst, dstsize);
1811 needed = pg_strtitle(dst, dstsize, src, srclen, mylocale);
1812 Assert(needed + 1 <= dstsize);
1813 }
1814
1815 Assert(dst[needed] == '\0');
1816 result = dst;
1817 }
1818
1819 return result;
1820}
char * asc_initcap(const char *buff, size_t nbytes)
Definition: formatting.c:1944
size_t pg_strtitle(char *dst, size_t dstsize, const char *src, ssize_t srclen, pg_locale_t locale)
Definition: pg_locale.c:1275

References asc_initcap(), Assert(), collid, pg_locale_struct::ctype_is_c, ereport, errcode(), errhint(), errmsg(), ERROR, OidIsValid, palloc(), pg_newlocale_from_collation(), pg_strtitle(), and repalloc().

Referenced by initcap(), and str_initcap_z().

◆ str_tolower()

char * str_tolower ( const char *  buff,
size_t  nbytes,
Oid  collid 
)

Definition at line 1637 of file formatting.c.

1638{
1639 char *result;
1640 pg_locale_t mylocale;
1641
1642 if (!buff)
1643 return NULL;
1644
1645 if (!OidIsValid(collid))
1646 {
1647 /*
1648 * This typically means that the parser could not resolve a conflict
1649 * of implicit collations, so report it that way.
1650 */
1651 ereport(ERROR,
1652 (errcode(ERRCODE_INDETERMINATE_COLLATION),
1653 errmsg("could not determine which collation to use for %s function",
1654 "lower()"),
1655 errhint("Use the COLLATE clause to set the collation explicitly.")));
1656 }
1657
1659
1660 /* C/POSIX collations use this path regardless of database encoding */
1661 if (mylocale->ctype_is_c)
1662 {
1663 result = asc_tolower(buff, nbytes);
1664 }
1665 else
1666 {
1667 const char *src = buff;
1668 size_t srclen = nbytes;
1669 size_t dstsize;
1670 char *dst;
1671 size_t needed;
1672
1673 /* first try buffer of equal size plus terminating NUL */
1674 dstsize = srclen + 1;
1675 dst = palloc(dstsize);
1676
1677 needed = pg_strlower(dst, dstsize, src, srclen, mylocale);
1678 if (needed + 1 > dstsize)
1679 {
1680 /* grow buffer if needed and retry */
1681 dstsize = needed + 1;
1682 dst = repalloc(dst, dstsize);
1683 needed = pg_strlower(dst, dstsize, src, srclen, mylocale);
1684 Assert(needed + 1 <= dstsize);
1685 }
1686
1687 Assert(dst[needed] == '\0');
1688 result = dst;
1689 }
1690
1691 return result;
1692}
size_t pg_strlower(char *dst, size_t dstsize, const char *src, ssize_t srclen, pg_locale_t locale)
Definition: pg_locale.c:1256

References asc_tolower(), Assert(), collid, pg_locale_struct::ctype_is_c, ereport, errcode(), errhint(), errmsg(), ERROR, OidIsValid, palloc(), pg_newlocale_from_collation(), pg_strlower(), and repalloc().

Referenced by citext_eq(), citext_hash(), citext_hash_extended(), citext_ne(), citextcmp(), convertPgWchar(), dispell_init(), dispell_lexize(), dsimple_init(), dsimple_lexize(), dsnowball_init(), dsnowball_lexize(), dsynonym_init(), dsynonym_lexize(), dxsyn_lexize(), generate_trgm_only(), generate_wildcard_trgm(), internal_citext_pattern_cmp(), lower(), lowerstr_ctx(), ltree_strncasecmp(), NIImportAffixes(), read_dictionary(), seq_search_localized(), and str_tolower_z().

◆ str_toupper()

char * str_toupper ( const char *  buff,
size_t  nbytes,
Oid  collid 
)

Definition at line 1701 of file formatting.c.

1702{
1703 char *result;
1704 pg_locale_t mylocale;
1705
1706 if (!buff)
1707 return NULL;
1708
1709 if (!OidIsValid(collid))
1710 {
1711 /*
1712 * This typically means that the parser could not resolve a conflict
1713 * of implicit collations, so report it that way.
1714 */
1715 ereport(ERROR,
1716 (errcode(ERRCODE_INDETERMINATE_COLLATION),
1717 errmsg("could not determine which collation to use for %s function",
1718 "upper()"),
1719 errhint("Use the COLLATE clause to set the collation explicitly.")));
1720 }
1721
1723
1724 /* C/POSIX collations use this path regardless of database encoding */
1725 if (mylocale->ctype_is_c)
1726 {
1727 result = asc_toupper(buff, nbytes);
1728 }
1729 else
1730 {
1731 const char *src = buff;
1732 size_t srclen = nbytes;
1733 size_t dstsize;
1734 char *dst;
1735 size_t needed;
1736
1737 /* first try buffer of equal size plus terminating NUL */
1738 dstsize = srclen + 1;
1739 dst = palloc(dstsize);
1740
1741 needed = pg_strupper(dst, dstsize, src, srclen, mylocale);
1742 if (needed + 1 > dstsize)
1743 {
1744 /* grow buffer if needed and retry */
1745 dstsize = needed + 1;
1746 dst = repalloc(dst, dstsize);
1747 needed = pg_strupper(dst, dstsize, src, srclen, mylocale);
1748 Assert(needed + 1 <= dstsize);
1749 }
1750
1751 Assert(dst[needed] == '\0');
1752 result = dst;
1753 }
1754
1755 return result;
1756}
char * asc_toupper(const char *buff, size_t nbytes)
Definition: formatting.c:1921
size_t pg_strupper(char *dst, size_t dstsize, const char *src, ssize_t srclen, pg_locale_t locale)
Definition: pg_locale.c:1294

References asc_toupper(), Assert(), collid, pg_locale_struct::ctype_is_c, ereport, errcode(), errhint(), errmsg(), ERROR, OidIsValid, palloc(), pg_newlocale_from_collation(), pg_strupper(), and repalloc().

Referenced by seq_search_localized(), str_toupper_z(), and upper().