gpt4 book ai didi

postgresql - 如何在 postgresql 中显示用户的 udt 定义?

转载 作者:行者123 更新时间:2023-11-29 11:50:15 24 4
gpt4 key购买 nike

我知道 udt 定义依赖于 pg_catalog.pg_type,但是是否有另一个表可以让我获取它的列/元素?

最佳答案

可以从 pg_attribute 中读取用户定义类型的列表:

SELECT *
FROM pg_attribute
WHERE attrelid::regclass = 'my_type_schema.my-type_name'::regclass

其中类型名称可以选择是模式限定的。我在很多相关的回答中写到了pg_attributeregclass。搜索更多...

关于postgresql - 如何在 postgresql 中显示用户的 udt 定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24023941/

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