mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
Simplify the definitions of a couple of system views by using SELECT *
instead of listing all the columns returned by the underlying function. initdb not forced since this patch doesn't actually change anything about the stored form of the views. It just means there's one less place to change if someone wants to add columns to them.
This commit is contained in:
parent
3290e6180f
commit
579c025e5f
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.54 2008/08/25 11:18:43 mha Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.55 2008/09/21 19:38:56 tgl Exp $
|
||||
*/
|
||||
|
||||
CREATE VIEW pg_roles AS
|
||||
@ -142,13 +142,10 @@ CREATE VIEW pg_stats AS
|
||||
REVOKE ALL on pg_statistic FROM public;
|
||||
|
||||
CREATE VIEW pg_locks AS
|
||||
SELECT *
|
||||
FROM pg_lock_status() AS L;
|
||||
SELECT * FROM pg_lock_status() AS L;
|
||||
|
||||
CREATE VIEW pg_cursors AS
|
||||
SELECT C.name, C.statement, C.is_holdable, C.is_binary,
|
||||
C.is_scrollable, C.creation_time
|
||||
FROM pg_cursor() AS C;
|
||||
SELECT * FROM pg_cursor() AS C;
|
||||
|
||||
CREATE VIEW pg_prepared_xacts AS
|
||||
SELECT P.transaction, P.gid, P.prepared,
|
||||
@ -158,12 +155,10 @@ CREATE VIEW pg_prepared_xacts AS
|
||||
LEFT JOIN pg_database D ON P.dbid = D.oid;
|
||||
|
||||
CREATE VIEW pg_prepared_statements AS
|
||||
SELECT P.name, P.statement, P.prepare_time, P.parameter_types, P.from_sql
|
||||
FROM pg_prepared_statement() AS P;
|
||||
SELECT * FROM pg_prepared_statement() AS P;
|
||||
|
||||
CREATE VIEW pg_settings AS
|
||||
SELECT *
|
||||
FROM pg_show_all_settings() AS A;
|
||||
SELECT * FROM pg_show_all_settings() AS A;
|
||||
|
||||
CREATE RULE pg_settings_u AS
|
||||
ON UPDATE TO pg_settings
|
||||
|
Loading…
Reference in New Issue
Block a user