SHOW CREATE VIEW
功能描述
它返回可用于重新创建命名视图的确切字符串。
注意事项
character_set_client是client_encoding创建例程时系统变量的会话值。
collation_connection是lc_collate创建数据库时指定的值。
语法格式
SHOW CREATE VIEW view_name
参数说明
view_name
视图名。
示例
--创建视图
openGauss=# create view tt19v as
openGauss-# select 'foo'::text = any(array['abc','def','foo']::text[]) c1,
openGauss-# 'foo'::text = any((select array['abc','def','foo']::text[])::text[]) c2;
CREATE VIEW
--查询视图创建语句
openGauss=# show create view tt19v;
View | Create View
| character_set_client | collation_connection
-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------
tt19v | CREATE OR REPLACE VIEW public.tt19v AS
+| UTF8 | en_US.UTF-8
| SELECT ('foo'::text = ANY (ARRAY['abc'::text, 'def'::text, 'foo'::text])) AS c1, ('foo'::text = ANY ((SELECT ARRAY['abc'::text, 'def'::text, 'foo'::text] AS "array")::text[])) AS c2; | |
(1 row)
意见反馈