 |
|
This section shows how various PostgreSQL datatypes are mapped to Borland's TField descendants. | PostgreSQL datatypes | TField descedant |
|---|
| bigint (int8), bigserial | TLargeintField | | smallint (int2) | TSmallIntField | | integer (int4) | TIntegerField | | serial | TAutoIncField | | decimal, numeric, real, double precision | TFloatField | | money (deprecated) | TStringField | | character varying(<8192) (varchar) | TStringField | | character varying(>=8192) (varchar) | TMemoField | | character(n) (char) | TStringField | | text | TMemoField | | bytea, oid | TBlobField | | boolean | TBooleanField | | timestamp [ (p) ] [ without time zone ] | TDateTimeField | | timestamp [ (p) ] with time zone | TStringField | | time [ (p) ] [ without time zone ] | TTimeField | | time [ (p) ] with time zone | TStringField | | date | TDateField | | interval [ (p) ] | TStringField | | point, line, lseg, box, polygon (closed path), path, circle | TStringField | | cidr, inet, macaddr | TStringField | | bit(n), bit varying(n) | TStringField | | arrays types | TStringField | | composite and user defined types | TStringField |
 | Be careful while working with Unicode encodings fields (e.g., utf8). Their lengths are
evaluated in symbols, not in bytes: data lost may happen. |
 | Delphi 7 and prior has poor support for int64 values in variant type.
This means that you'll be unable to use Locate()
and similar methods with such fields. Lookup fields will not work proper too due to their
dependence on Locate() method. Please update your
IDE to BDS 2006 or don't use bigint (int8) and bigserial datatypes for keys
and indexes if you need to use them in lookup fields. |
|