c - string to Numeric/Date in PostgreSQL -


  1. i have string numeric/date value in it. need convert string apply numericgetdatum()/dateadtgetdatum function respectively. how go it?

    i looked to_char() function, but, wouldn't know format convert (how many digits/date format).

  2. when query information_schema.columns table know datatype of column, value numeric. postgresql mentions in table http://www.postgresql.org/docs/9.1/static/datatype-numeric.html#datatype-numeric-table, different numeric types available. why doesn't query return 1 of types, instead of numeric?

thanks!

  1. most types have own file in src/backend/utils/adt/ containing variety of supporting functions. string conversion routine numeric, in src/backend/utils/adt/numeric.c, called numeric_in() (likewise date). search postgres codebase examples of how these functions called.

  2. there many different types representing numbers (i.e. "numeric types"). 1 of these types called numeric (it appears in table linked to).


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -