formatting.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /* -----------------------------------------------------------------------
  2. * formatting.h
  3. *
  4. * src/include/utils/formatting.h
  5. *
  6. *
  7. * Portions Copyright (c) 1999-2022, PostgreSQL Global Development Group
  8. *
  9. * The PostgreSQL routines for a DateTime/int/float/numeric formatting,
  10. * inspired by the Oracle TO_CHAR() / TO_DATE() / TO_NUMBER() routines.
  11. *
  12. * Karel Zak
  13. *
  14. * -----------------------------------------------------------------------
  15. */
  16. #ifndef _FORMATTING_H_
  17. #define _FORMATTING_H_
  18. extern char *str_tolower(const char *buff, size_t nbytes, Oid collid);
  19. extern char *str_toupper(const char *buff, size_t nbytes, Oid collid);
  20. extern char *str_initcap(const char *buff, size_t nbytes, Oid collid);
  21. extern char *asc_tolower(const char *buff, size_t nbytes);
  22. extern char *asc_toupper(const char *buff, size_t nbytes);
  23. extern char *asc_initcap(const char *buff, size_t nbytes);
  24. extern Datum parse_datetime(text *date_txt, text *fmt, Oid collid, bool strict,
  25. Oid *typid, int32 *typmod, int *tz,
  26. bool *have_error);
  27. #endif