README 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Postgres driver.
  2. This driver was originaly written by Alex Shevlakov using dbf driver
  3. (PostgreSQL driver forked from DBF driver by Radim Blazek).
  4. DBF driver was not good starting point, so I (R. Blazek) have rewritten it again
  5. using ODBC, postgres driver and adding new code.
  6. Driver supports only some field types, other types are ignored and warning is printed
  7. by G_warning().
  8. FIELD TYPES:
  9. Field type code may change. See for example
  10. http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/catalog/pg_type.h
  11. Because of this, type codes must be read from server when database is opened.
  12. Check also for PostgreSQL data types for defining them in GRASS:
  13. /usr/include/pgsql/server/catalog/pg_type.h
  14. Supported types in ./globals.h:
  15. (http://www.postgresql.org/docs/8.2/interactive/datatype.html)
  16. DB_C_TYPE_INT:
  17. bit, int2, smallint, int4, int, integer, int8, bigint, serial, oid
  18. DB_C_TYPE_DOUBLE:
  19. float4, real, float8, double precision, numeric, decimal
  20. DB_C_TYPE_STRING:
  21. character, char, character varying, varchar, text, bool, boolean
  22. DB_C_TYPE_DATETIME:
  23. date, time, timestamp