gpt4 book ai didi

postgresql -\dt 的输出是什么意思?

转载 作者:行者123 更新时间:2023-11-29 12:41:31 25 4
gpt4 key购买 nike

postgres=# \c students
You are now connected to database "students" as user "postgres".
students=# \dt;
public | student | table | postgres

students=# \dt+
public | student | table | postgres | 0 bytes |

students=#

\dt 的输出是什么意思?我只知道事先数据库students下有一张表student

我正在使用 psql (9.6.6)。

谢谢。

最佳答案

\dt(无参数)似乎列出了当前架构中的所有表,正如此处的文档所解释的那样:http://www.postgresonline.com/special_feature.php?sf_name=postgresql83_psql_cheatsheet

您的输出是显示(一个)学生表的一行。如果我创建一个表,类似地,我得到这个:

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

执行 \dt+ 以查看稍微扩展的信息。

关于postgresql -\dt 的输出是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48312634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com