formatting.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -----------------------------------------------------------------------
  2. * formatting.h
  3. *
  4. * src/include/utils/formatting.h
  5. *
  6. *
  7. * Portions Copyright (c) 1999-2016, 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. #ifndef _FORMATTING_H_
  17. #define _FORMATTING_H_
  18. #include "fmgr.h"
  19. extern char *str_tolower(const char *buff, size_t nbytes, Oid collid);
  20. extern char *str_toupper(const char *buff, size_t nbytes, Oid collid);
  21. extern char *str_initcap(const char *buff, size_t nbytes, Oid collid);
  22. extern char *asc_tolower(const char *buff, size_t nbytes);
  23. extern char *asc_toupper(const char *buff, size_t nbytes);
  24. extern char *asc_initcap(const char *buff, size_t nbytes);
  25. extern Datum timestamp_to_char(PG_FUNCTION_ARGS);
  26. extern Datum timestamptz_to_char(PG_FUNCTION_ARGS);
  27. extern Datum interval_to_char(PG_FUNCTION_ARGS);
  28. extern Datum to_timestamp(PG_FUNCTION_ARGS);
  29. extern Datum to_date(PG_FUNCTION_ARGS);
  30. extern Datum numeric_to_number(PG_FUNCTION_ARGS);
  31. extern Datum numeric_to_char(PG_FUNCTION_ARGS);
  32. extern Datum int4_to_char(PG_FUNCTION_ARGS);
  33. extern Datum int8_to_char(PG_FUNCTION_ARGS);
  34. extern Datum float4_to_char(PG_FUNCTION_ARGS);
  35. extern Datum float8_to_char(PG_FUNCTION_ARGS);
  36. #endif