Commit | Line | Data |
4e024194 |
1 | -- $Header: /home/faga/work/sqlfairy_svn/sqlfairy-cvsbackup/sqlfairy/t/data/pgsql/entire_syntax.sql,v 1.1 2003-08-17 00:42:57 rossta Exp $ |
2 | |
3 | -- done: |
4 | |
5 | -- smallint int2 signed two-byte integer |
6 | -- integer int, int4 signed four-byte integer |
7 | -- bigint int8 signed eight-byte integer |
8 | -- serial serial4 autoincrementing four-byte integer |
9 | -- bigserial serial8 autoincrementing eight-byte integer |
10 | |
11 | -- real float4 single precision floating-point number |
12 | -- double precision float8 double precision floating-point number |
13 | |
14 | -- numeric [ (p, s) ] decimal [ (p, s) ] exact numeric with selectable precision |
15 | |
16 | -- character(n) char(n) fixed-length character string |
17 | -- character varying(n) varchar(n) variable-length character string |
18 | |
19 | -- date calendar date (year, month, day) |
20 | |
21 | -- time [ (p) ] [ without time zone ] time of day |
22 | -- time [ (p) ] with time zone timetz time of day, including time zone |
23 | |
24 | -- timestamp [ (p) ] without time zone timestamp date and time |
25 | -- timestamp [ (p) ] [ with time zone ] timestamptz date and time, including time zone |
26 | |
27 | -- bytea binary data |
28 | |
29 | -- text variable-length character string |
30 | |
31 | -- to do: |
32 | |
33 | -- bit fixed-length bit string |
34 | -- bit varying(n) varbit(n) variable-length bit string |
35 | -- boolean bool logical Boolean (true/false) |
36 | -- box rectangular box in 2D plane |
37 | -- cidr IP network address |
38 | -- circle circle in 2D plane |
39 | -- inet IP host address |
40 | -- interval(p) general-use time span |
41 | -- line infinite line in 2D plane (not implemented) |
42 | -- lseg line segment in 2D plane |
43 | -- macaddr MAC address |
44 | -- money currency amount |
45 | -- path open and closed geometric path in 2D plane |
46 | -- point geometric point in 2D plane |
47 | -- polygon closed geometric path in 2D plane |
48 | |
49 | -- Compatibility: The following types (or spellings thereof) are specified by SQL: |
50 | -- bit, bit varying, boolean, char, character, character varying, varchar, date, |
51 | -- double precision, integer, interval, numeric, decimal, real, smallint, time, |
52 | -- timestamp (both with or without time zone). |
53 | |
54 | CREATE TABLE t01 ( |
55 | i01 SMALLINT, |
56 | i02 INT2, |
57 | i03 INT, |
58 | i04 INTEGER, |
59 | i05 INT4, |
60 | i06 BIGINT, |
61 | i07 INT8, |
62 | i08 SERIAL, |
63 | i09 SERIAL4, |
64 | i10 BIGSERIAL, |
65 | i11 SERIAL8, |
66 | |
67 | r01 REAL, |
68 | r02 FLOAT4, |
69 | r03 DOUBLE PRECISION, |
70 | r04 FLOAT, |
71 | r05 FLOAT8, |
72 | |
73 | n01 DECIMAL, |
74 | n02 NUMERIC, |
75 | |
76 | c01 CHAR(10), |
77 | c02 VARCHAR(10), |
78 | c03 CHARACTER(10), |
79 | c04 CHARACTER VARYING(10), |
80 | |
81 | d01 DATE, |
82 | d02 TIME, |
83 | d03 TIMETZ, |
84 | d04 TIMESTAMP, |
85 | d05 TIMESTAMPTZ, |
86 | |
87 | b01 BYTEA, |
88 | |
89 | t01 TEXT |
90 | ); |