大小寫有區分,預設是小寫
不會進行轉換
CREATE TABLE test1 (
title varchar(2),
TITLE1 varchar(2)
);
test=# \d+ test1
Table "public.test1"
Column | Type | Modifiers | Storage | Stats target | Description
--------+----------------------+-----------+----------+--------------+-------------
title | character varying(2) | | extended | |
title1 | character varying(2) | | extended | |
CREATE TABLE "TEST2" (
title varchar(2),
TITLE1 varchar(2)
);
test=# \d+ test2
Did not find any relation named "test2".
test=# \d "TEST2"
Table "public.TEST2"
Column | Type | Modifiers
--------+----------------------+-----------
title | character varying(2) |
title1 | character varying(2) |
CREATE TABLE "TEST3" (
title varchar(2),
"TITLE1" varchar(2)
);
test=# \d "TEST3"
Table "public.TEST3"
Column | Type | Modifiers
--------+----------------------+-----------
title | character varying(2) |
TITLE1 | character varying(2) |
test=# select * from test3;
ERROR: relation "test3" does not exist
LINE 1: select * from test3;
test=# select * from "TEST3";
title | TITLE1
-------+--------
(0 rows)
test=# select title from "TEST3";
title
-------
(0 rows)
test=# select "TITLE1" from "TEST3";
TITLE1
--------
(0 rows)
張貼留言