Debian Codegraph @

db/drivers/postgres/README

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