]> granicus.if.org Git - postgresql/blob - src/include/utils/formatting.h
Add new to_reg* functions for error-free OID lookups.
[postgresql] / src / include / utils / formatting.h
1 /* -----------------------------------------------------------------------
2  * formatting.h
3  *
4  * src/include/utils/formatting.h
5  *
6  *
7  *       Portions Copyright (c) 1999-2014, PostgreSQL Global Development Group
8  *
9  *       The PostgreSQL routines for a DateTime/int/float/numeric formatting,
10  *       inspire with Oracle TO_CHAR() / TO_DATE() / TO_NUMBER() routines.
11  *
12  *       Karel Zak
13  *
14  * -----------------------------------------------------------------------
15  */
16
17 #ifndef _FORMATTING_H_
18 #define _FORMATTING_H_
19
20 #include "fmgr.h"
21
22
23 extern char *str_tolower(const char *buff, size_t nbytes, Oid collid);
24 extern char *str_toupper(const char *buff, size_t nbytes, Oid collid);
25 extern char *str_initcap(const char *buff, size_t nbytes, Oid collid);
26
27 extern char *asc_tolower(const char *buff, size_t nbytes);
28 extern char *asc_toupper(const char *buff, size_t nbytes);
29 extern char *asc_initcap(const char *buff, size_t nbytes);
30
31 extern Datum timestamp_to_char(PG_FUNCTION_ARGS);
32 extern Datum timestamptz_to_char(PG_FUNCTION_ARGS);
33 extern Datum interval_to_char(PG_FUNCTION_ARGS);
34 extern Datum to_timestamp(PG_FUNCTION_ARGS);
35 extern Datum to_date(PG_FUNCTION_ARGS);
36 extern Datum numeric_to_number(PG_FUNCTION_ARGS);
37 extern Datum numeric_to_char(PG_FUNCTION_ARGS);
38 extern Datum int4_to_char(PG_FUNCTION_ARGS);
39 extern Datum int8_to_char(PG_FUNCTION_ARGS);
40 extern Datum float4_to_char(PG_FUNCTION_ARGS);
41 extern Datum float8_to_char(PG_FUNCTION_ARGS);
42
43 #endif