乐贴网
  • 首页
  • 程序语言
  • AI时代
  • SEO优化
  • 账号分享
  • 每日神器
  • 开源软件
  • 操作系统
  • 更多
    • 数据库
    • 框架
    • 移动开发
    • 人工智能
    • 区块链

Postgres 能否以SELECT的多行多列的表格作为函数参数?

postgresql 4年前 28
+-
  1. 首页
  2. postgresql
  3. 正文

Postgres 能否以SELECT的多行多列的表格作为函数参数?

因为我想直接写一个函数来把所有必要的SELECT结果转换为 JSONB 数据
现在是

SELECT COALESCE(jsonb_agg(tmp)::text, '[]') FROM ( SELECT... FROM ... ) AS tmp

我想直接写成

SELECT to_json_string((SELECT ... FROM ...));

可以吗?

msyqloraclemongodbpostgresql
思否

相关推荐

用于将自定义表达式传递到where条件的实体框架查询的C#Linq Lambda表达式

用于将自定义表达式传递到where条件的实体框架查询的C#Linq Lambda表达式

postgresql 6年前 99
PostgreSQL数据库加密选项

PostgreSQL数据库加密选项

postgresql 4年前 88
Postgres 能否以SELECT的多行多列的表格作为函数参数?

Postgres 能否以SELECT的多行多列的表格作为函数参数?

postgresql 4年前 28
奇怪的代码:JS Console.log()输出两次,但输出不同

奇怪的代码:JS Console.log()输出两次,但输出不同

postgresql 6年前 112
postgres - bigint超出范围错误,用于非常大的数字的数据类型

postgres - bigint超出范围错误,用于非常大的数字的数据类型

postgresql 6年前 105
阿里云数据库RDS PG联合电商SaaS领导者班牛,助力1500+品牌数智化

阿里云数据库RDS PG联合电商SaaS领导者班牛,助力1500+品牌数智化

postgresql 4年前 27
使用PostgreSQL进行简单而缓慢的SQL查询

使用PostgreSQL进行简单而缓慢的SQL查询

postgresql 5年前 132
postgreSQL自定义函数的$$的使用疑问,

postgreSQL自定义函数的$$的使用疑问,

postgresql 4年前 42
从Oracle迁移到PostgreSQL的十大理由

从Oracle迁移到PostgreSQL的十大理由

postgresql 5年前 60
postgresql fdw 安装使用

postgresql fdw 安装使用

postgresql 4年前 42
在WHERE子句中选择最小日期

在WHERE子句中选择最小日期

postgresql 6年前 89
PostGIS的使用

PostGIS的使用

postgresql 4年前 48

Copyright © 2012 乐贴网 - All rights reserved