[英]Need the output in specific format in psql
Suppose:- 假设:-
subh=# select 'test123';
?column?
-------------------------------------
test123
and 和
subh=# select obj_description('test123'::regclass);
obj_description
--------------------
this is my table
I am running this query :- 我正在运行此查询:
subh=# select 'test123' || ' ' || obj_description('test123'::regclass) as test;
test
-------------------------------
test123 this is my table
Actually I want the output to be as follows :- 实际上我希望输出如下:-
test
-------------------------------
test123 'this is my table'
subh=# select 'test123' || ' \'' || obj_description('test123'::regclass) as test || '\'';
test
-------------------------------
test123 'this is my table'
\\'
will be used for adding quote \\'
将用于添加报价
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.