Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何在Vertica数据库中获取对象的元数据;像表的元数据。是否有任何表存储Vertica数据库中对象(函数、视图、表)的元数据。 例如,在Oracle中,我可以键入以下内容并获取表的详细描述或查看过程的代码。 oracle :> desc table_name; 或者 oracle :> edit proc_name;
oracle :> desc table_name;
oracle :> edit proc_name;
我知道我可以使用\dt命令从我的模式中查看表,但是有什么方法可以查看创建对象的DDL语句?
\dt
谢谢,但这不是我想要的。我正在寻找的是export_objects()功能:
export_objects()
select export_objects('','object_name')
这样您将获得对象的创建脚本。
\d table-name应该得到你所需要的。
\d table-name
额外提示:如果您只指定模式,您将获得该模式内的所有对象。当然,必须进入一个循环,为每个对象运行 export_objects()。