-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpg_catalog-timestamp-etc.sql
More file actions
66 lines (54 loc) · 1.31 KB
/
pg_catalog-timestamp-etc.sql
File metadata and controls
66 lines (54 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-- timestamp(2) with time zone
CREATE TABLE public."ACTIVITY" (
"ACTIVITY_ID" bigint NOT NULL,
"PUBLISHED" timestamp(2) with time zone
);
-- timestamp(2)
CREATE TABLE public."ACTIVITY" (
"ACTIVITY_ID" bigint NOT NULL,
"PUBLISHED" timestamp(2)
);
-- text
CREATE TABLE public."EXAMPLE" (
"MESSAGE" text
);
-- TIME WITHOUT TIME ZONE
CREATE TABLE public."EXAMPLE_TIME" (
"START_TIME" time
);
-- TIME WITH TIME ZONE (aka timetz)
CREATE TABLE public."EXAMPLE_TIMETZ" (
"START_TIME" time with time zone
);
-- TIME(n) WITHOUT TIME ZONE
CREATE TABLE public."EXAMPLE_TIME_PRECISION" (
"START_TIME" time(3)
);
-- TIME(n) WITH TIME ZONE (aka timetz(n))
CREATE TABLE public."EXAMPLE_TIMETZ_PRECISION" (
"START_TIME" time(3) with time zone
);
-- TIMESTAMP WITHOUT TIME ZONE (alias of timestamp)
CREATE TABLE public."EXAMPLE_TIMESTAMP" (
"CREATED_AT" timestamp
);
-- TIMESTAMP WITH TIME ZONE (alias of timestamptz)
CREATE TABLE public."EXAMPLE_TIMESTAMPTZ" (
"CREATED_AT" timestamp with time zone
);
-- INTERVAL
CREATE TABLE public."EXAMPLE_INTERVAL" (
"DURATION" interval
);
-- INTERVAL with precision
CREATE TABLE public."EXAMPLE_INTERVAL_PRECISION" (
"DURATION" interval(2)
);
-- DATE
CREATE TABLE public."EXAMPLE_DATE" (
"BIRTHDAY" date
);
-- BOOLEAN
CREATE TABLE public."EXAMPLE_BOOL" (
"IS_ACTIVE" boolean
);