Skip to content

Commit 9b5140f

Browse files
committed
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.
1 parent 3cda10f commit 9b5140f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/src/sgml/information_schema.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5456,7 +5456,7 @@ ORDER BY c.ordinal_position;
54565456
<entry>
54575457
Type of the table: <literal>BASE TABLE</literal> for a
54585458
persistent base table (the normal table type),
5459-
<literal>VIEW</literal> for a view, <literal>FOREIGN TABLE</literal>
5459+
<literal>VIEW</literal> for a view, <literal>FOREIGN</literal>
54605460
for a foreign table, or
54615461
<literal>LOCAL TEMPORARY</literal> for a temporary table
54625462
</entry>

src/backend/catalog/information_schema.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1914,7 +1914,7 @@ CREATE VIEW tables AS
19141914
CASE WHEN nc.oid = pg_my_temp_schema() THEN 'LOCAL TEMPORARY'
19151915
WHEN c.relkind IN ('r', 'p') THEN 'BASE TABLE'
19161916
WHEN c.relkind = 'v' THEN 'VIEW'
1917-
WHEN c.relkind = 'f' THEN 'FOREIGN TABLE'
1917+
WHEN c.relkind = 'f' THEN 'FOREIGN'
19181918
ELSE null END
19191919
AS character_data) AS table_type,
19201920

0 commit comments

Comments
 (0)