From 9b5140fb503eb50634cd7e080d41f4d9af41e0a6 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 16 Aug 2017 11:03:33 -0400 Subject: [PATCH] Correct representation of foreign tables in information schema tables.table_type is supposed to be 'FOREIGN' rather than 'FOREIGN TABLE' according to the SQL standard. --- doc/src/sgml/information_schema.sgml | 2 +- src/backend/catalog/information_schema.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml index b85849b2588..e07ff35bca0 100644 --- a/doc/src/sgml/information_schema.sgml +++ b/doc/src/sgml/information_schema.sgml @@ -5456,7 +5456,7 @@ ORDER BY c.ordinal_position; Type of the table: BASE TABLE for a persistent base table (the normal table type), - VIEW for a view, FOREIGN TABLE + VIEW for a view, FOREIGN for a foreign table, or LOCAL TEMPORARY for a temporary table diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql index 5398271ad01..236f6be37e8 100644 --- a/src/backend/catalog/information_schema.sql +++ b/src/backend/catalog/information_schema.sql @@ -1914,7 +1914,7 @@ CREATE VIEW tables AS CASE WHEN nc.oid = pg_my_temp_schema() THEN 'LOCAL TEMPORARY' WHEN c.relkind IN ('r', 'p') THEN 'BASE TABLE' WHEN c.relkind = 'v' THEN 'VIEW' - WHEN c.relkind = 'f' THEN 'FOREIGN TABLE' + WHEN c.relkind = 'f' THEN 'FOREIGN' ELSE null END AS character_data) AS table_type,