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

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

postgresql 4年前 27
+-
  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
思否

相关推荐

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

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

postgresql 6年前 111
CentOS 8 源码编译安装PostgreSQL(13.1)

CentOS 8 源码编译安装PostgreSQL(13.1)

postgresql 5年前 65
postgresql fdw 安装使用

postgresql fdw 安装使用

postgresql 4年前 41
多台机器之间一键化互信脚本实现

多台机器之间一键化互信脚本实现

postgresql 4年前 23
Odoo 14 Centos 7 安装教程

Odoo 14 Centos 7 安装教程

postgresql 4年前 87
PostgreSQL数据库加密选项

PostgreSQL数据库加密选项

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

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

postgresql 4年前 41
优化PostgreSQL Autovacuum

优化PostgreSQL Autovacuum

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

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

postgresql 6年前 97
Kong和konga 入门教程

Kong和konga 入门教程

postgresql 4年前 61
错误:关系“student_id_seq”不存在SQL状态:42P01

错误:关系“student_id_seq”不存在SQL状态:42P01

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

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

postgresql 5年前 131

Copyright © 2012 乐贴网 - All rights reserved