Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 579c025

Browse files
committed
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.
1 parent 3290e61 commit 579c025

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/backend/catalog/system_views.sql

+5-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.54 2008/08/25 11:18:43 mha Exp $
6+
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.55 2008/09/21 19:38:56 tgl Exp $
77
*/
88

99
CREATE VIEW pg_roles AS
@@ -142,13 +142,10 @@ CREATE VIEW pg_stats AS
142142
REVOKE ALL on pg_statistic FROM public;
143143

144144
CREATE VIEW pg_locks AS
145-
SELECT *
146-
FROM pg_lock_status() AS L;
145+
SELECT * FROM pg_lock_status() AS L;
147146

148147
CREATE VIEW pg_cursors AS
149-
SELECT C.name, C.statement, C.is_holdable, C.is_binary,
150-
C.is_scrollable, C.creation_time
151-
FROM pg_cursor() AS C;
148+
SELECT * FROM pg_cursor() AS C;
152149

153150
CREATE VIEW pg_prepared_xacts AS
154151
SELECT P.transaction, P.gid, P.prepared,
@@ -158,12 +155,10 @@ CREATE VIEW pg_prepared_xacts AS
158155
LEFT JOIN pg_database D ON P.dbid = D.oid;
159156

160157
CREATE VIEW pg_prepared_statements AS
161-
SELECT P.name, P.statement, P.prepare_time, P.parameter_types, P.from_sql
162-
FROM pg_prepared_statement() AS P;
158+
SELECT * FROM pg_prepared_statement() AS P;
163159

164160
CREATE VIEW pg_settings AS
165-
SELECT *
166-
FROM pg_show_all_settings() AS A;
161+
SELECT * FROM pg_show_all_settings() AS A;
167162

168163
CREATE RULE pg_settings_u AS
169164
ON UPDATE TO pg_settings

0 commit comments

Comments
 (0)