pirka
IOP-tool Tips
DBメタ情報からインターフェース作成時の型対応表(PostgreSQL) †
データベースメタ情報からインターフェースを作成したときの主な型の対応は以下の通り
項目の型 | | IOP-toolの型 | 項目長 | 小数部長 |
int2 | → | NUM | 5 | |
int4 | → | NUM | 10 | |
int8 | → | NUM | 19 | |
numeric(4) | → | NUM | 4 | |
numeric(8) | → | NUM | 8 | |
numeric(16) | → | NUM | 16 | |
numeric(4,2) | → | NUM | 4 | 2 |
numeric(8,4) | → | NUM | 8 | 4 |
numeric(16,8) | → | NUM | 16 | 8 |
float4 | → | NUM | 8 | 8 |
float8 | → | NUM | 17 | 17 |
money | → | NUM | 20 | |
varchar(10) | → | STRING | 10 | |
varchar(1000) | → | STRING | 1000 | |
bpchar(10) | → | STRING | 10 | |
bpchar(1000) | → | STRING | 1000 | |
text | → | STRING | 2147483647 | |
bytea | → | IMAGE | 2147483647 | |
interval | → | STRING | 49 | 6 |
date | → | DATE | 13 | |
bool | → | BOOLEAN | 1 | |
timestamp | → | DATE_TIME | 29 | 6 |
timestamptz | → | DATE_TIME | 35 | 6 |
time | → | TIME | 15 | 6 |
timetz | → | TIME | 21 | 6 |
確認に使ったテーブル †
CREATE TABLE sampletbl
(
item_smallint smallint NOT NULL,
item_integer integer,
item_bigint bigint,
item_numeric4_0 numeric(4),
item_numeric8_0 numeric(8),
item_numeric16_0 numeric(16),
item_numeric4_2 numeric(4,2),
item_numeric8_4 numeric(8,4),
item_numeric16_8 numeric(16,8),
item_real real,
item_double_precision double precision,
item_money money,
item_character_varying10 character varying(10),
item_character_varying1000 character varying(1000),
item_character10 character(10),
item_character1000 character(1000),
item_text text,
item_bytea bytea,
item_interval interval(6),
item_date date,
item_boolean boolean,
item_timestamp_wotz timestamp without time zone,
item_timestamp_wtz timestamp with time zone,
item_time_wotz time without time zone,
item_time_wtz time with time zone,
CONSTRAINT sampletbl_pkey PRIMARY KEY (item_smallint)
)
作成されたインターフェース †