From 579c025e5fc8d3cc42fc65e1b23da20c9c9f4866 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 21 Sep 2008 19:38:56 +0000 Subject: [PATCH] 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. --- src/backend/catalog/system_views.sql | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql index 763c290e21..46023c60b0 100644 --- a/src/backend/catalog/system_views.sql +++ b/src/backend/catalog/system_views.sql @@ -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