对 postgres 表中的所有行运行集合返回函数并获取所有结果
我有一个 PostgreSQL 9.1 数据库和 svn 版本的 PostGIS 2.0。我有一个来自 postgis (ST_DumpAsPolygon) 的一组返回函数,它接受一行并返回多行。我有一个数据表,想要在输入的每一行上运行设置返回函数并返回所有行。但是 SELECT ST_DumpAsPolygon(rast) FROM mytable 似乎只返回一行中的值。有没有某种方法可以让集合返回函数在表中的每一行上运行,并将所有结果收集在一起,然后返回所有这些结果?
I have a PostgreSQL 9.1 database with a svn version of PostGIS 2.0. I have a set returning function from postgis (ST_DumpAsPolygon), which takes one row and returns many rows. I have a table of data and want to run the set returning function on each row of the input and return all the rows. However SELECT ST_DumpAsPolygon(rast) FROM mytable
seems to return the values from only one row. Is there some way to get the set returning function to run on every row in the table, and collect all the results together, and return all those results?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实上,我想我犯了一个错误。流程的前一步中的错误使我认为其中有些内容不在表中,因此我认为设置返回函数没有执行操作。
这可能应该被关闭。
Actually, I think I made a mistake. An error in a previous step of a process led me to think there were things in there that weren't in the table, and hence I thought that the set returning function wasn't doing things.
This should probably be closed.