Postgres:如何查看表的内容?

时间:2017-09-24 17:44:24

标签: postgresql

这是我的意思?

contacts=# \l
                                 List of databases
   Name    |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges
-----------+----------+----------+------------+------------+-----------------------
 contacts  | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 postgres  | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 template0 | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
           |          |          |            |            | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
           |          |          |            |            | postgres=CTc/postgres
(4 rows)

contacts=# \d
             List of relations
 Schema |     Name      | Type  |  Owner
--------+---------------+-------+----------
 public | SequelizeMeta | table | postgres
(1 row)

contacts=# select * from SequelizeMeta;
ERROR:  relation "sequelizemeta" does not exist
LINE 1: select * from SequelizeMeta;
                      ^
contacts=# contacts=# select * from public.SequelizeMeta;
ERROR:  relation "public.sequelizemeta" does not exist
LINE 1: select * from public.SequelizeMeta;
                      ^

如何阅读SequelizeMeta的内容?

由于

1 个答案:

答案 0 :(得分:2)

基于realloc()命令,这就是我必须要做的。谢谢wildplasser

wildplasser