如何从PLPGSQL提取表名和列名

发布于 2025-02-09 14:02:08 字数 144 浏览 0 评论 0原文

在与@dylan hogg(用户:249597)的同一行上,您提到了sql-app.infocruncher.com托管的库有PLPGSQL吗?将极大地帮助GP迁移任务。

基本上,我有GP功能脚本,我想从中获得表格和列名的清单。理想情况下,列数据类型也是如此。

On the same line as the @Dylan Hogg (user:249597) you mentioned the sql-app.infocruncher.com hosted library is there one for plpgsql? Would highly help GP migration tasks.

Basically I have the GP function script from which I'd like to get the inventory of table and column names. Ideally the Column data types as well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

删除会话 2025-02-16 14:02:08

此查询提供了仅限于特定表的信息:

SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = '<schema name>' AND table_name = '<table name>' ORDER BY ordinal_position;

This query provides the information, limited to a specific table:

SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = '<schema name>' AND table_name = '<table name>' ORDER BY ordinal_position;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文