public inbox for [email protected]
help / color / mirror / Atom feedDocumentation on information_ schema columns that does not exist
9+ messages / 3 participants
[nested] [flat]
* Documentation on information_ schema columns that does not exist
@ 2015-05-31 21:40 Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Clément Prévost @ 2015-05-31 21:40 UTC (permalink / raw)
To: pgsql-docs
Hi,
I found out that the following columns are documented (9.1->9.4) but not
present in the information_schema table of my 9.4 instance (ubuntu):
* information_schema.foreign_table_options.foreign_server_catalog
* information_schema.foreign_table_options.foreign_server_name
The source code (/src/backend/catalog/information_schema.sql) seems to
confirm that those columns shouldn't exist.
I'll be happy to help with a patch if it's indeed a documentation typo.
regards, clément prévost
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
@ 2015-05-31 21:54 ` Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2015-05-31 21:54 UTC (permalink / raw)
To: Clément Prévost <[email protected]>; +Cc: pgsql-docs; Peter Eisentraut <[email protected]>
=?UTF-8?B?Q2zDqW1lbnQgUHLDqXZvc3Q=?= <[email protected]> writes:
> I found out that the following columns are documented (9.1->9.4) but not
> present in the information_schema table of my 9.4 instance (ubuntu):
> * information_schema.foreign_table_options.foreign_server_catalog
> * information_schema.foreign_table_options.foreign_server_name
Yeah, that does seem like a copy-and-pasteo; there should only be 5
columns in the view according to the SQL standard and our code.
Another problem in the same area is that the column types of
foreign_table_schema and foreign_table_name seem to be "name":
# \d *.foreign_table_options
View "information_schema.foreign_table_options"
Column | Type | Modifiers
-----------------------+-----------------------------------+-----------
foreign_table_catalog | information_schema.sql_identifier |
foreign_table_schema | name |
foreign_table_name | name |
option_name | information_schema.sql_identifier |
option_value | information_schema.character_data |
The documentation claims these should be sql_identifier, and that's
what I'd expect in a SQL-standard view ...
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
@ 2015-05-31 22:14 ` Tom Lane <[email protected]>
2015-05-31 23:25 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2015-05-31 22:14 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: Clément Prévost <[email protected]>; pgsql-docs
I wrote:
> Another problem in the same area is that the column types of
> foreign_table_schema and foreign_table_name seem to be "name":
Further pursuant to that, these are the information_schema columns
that don't seem to have been cast to the spec-required type:
column_options | column_name | name
column_options | table_name | name
column_options | table_schema | name
foreign_table_options | foreign_table_name | name
foreign_table_options | foreign_table_schema | name
foreign_tables | foreign_table_name | name
foreign_tables | foreign_table_schema | name
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
@ 2015-05-31 23:25 ` Clément Prévost <[email protected]>
2015-06-01 00:27 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2016-08-03 18:59 ` Re: Documentation on information_ schema columns that does not exist Peter Eisentraut <[email protected]>
0 siblings, 2 replies; 9+ messages in thread
From: Clément Prévost @ 2015-05-31 23:25 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Peter Eisentraut <[email protected]>; pgsql-docs
Well spotted!
I attached 2 patches: 1 to fix erroneous documentation and the other to fix
information schema types.
regards, clément prévost
On 1 June 2015 at 00:14, Tom Lane <[email protected]> wrote:
> I wrote:
> > Another problem in the same area is that the column types of
> > foreign_table_schema and foreign_table_name seem to be "name":
>
> Further pursuant to that, these are the information_schema columns
> that don't seem to have been cast to the spec-required type:
>
> column_options | column_name | name
> column_options | table_name | name
> column_options | table_schema | name
> foreign_table_options | foreign_table_name | name
> foreign_table_options | foreign_table_schema | name
> foreign_tables | foreign_table_name | name
> foreign_tables | foreign_table_schema | name
>
> regards, tom lane
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/octet-stream] conform-information-schema-foreign-table-column-type-to-spec.patch (1.3K, 3-conform-information-schema-foreign-table-column-type-to-spec.patch)
download | inline diff:
diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql
index 6e1b241..5efed4f 100644
--- a/src/backend/catalog/information_schema.sql
+++ b/src/backend/catalog/information_schema.sql
@@ -2713,9 +2713,9 @@ GRANT SELECT ON element_types TO PUBLIC;
/* Base view for foreign table columns */
CREATE VIEW _pg_foreign_table_columns AS
- SELECT n.nspname,
- c.relname,
- a.attname,
+ SELECT CAST(n.nspname AS sql_identifier) AS nspname,
+ CAST(c.relname AS sql_identifier) AS relname,
+ CAST(a.attname AS sql_identifier) AS attname,
a.attfdwoptions
FROM pg_foreign_table t, pg_authid u, pg_namespace n, pg_class c,
pg_attribute a
@@ -2841,8 +2841,8 @@ GRANT SELECT ON foreign_servers TO PUBLIC;
CREATE VIEW _pg_foreign_tables AS
SELECT
CAST(current_database() AS sql_identifier) AS foreign_table_catalog,
- n.nspname AS foreign_table_schema,
- c.relname AS foreign_table_name,
+ CAST(n.nspname AS sql_identifier) AS foreign_table_schema,
+ CAST(c.relname AS sql_identifier) AS foreign_table_name,
t.ftoptions AS ftoptions,
CAST(current_database() AS sql_identifier) AS foreign_server_catalog,
CAST(srvname AS sql_identifier) AS foreign_server_name,
[application/octet-stream] remove-invalid-information-schema-doc.patch (866B, 4-remove-invalid-information-schema-doc.patch)
download | inline diff:
diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml
index ca1f20b..c6e6c9d 100644
--- a/doc/src/sgml/information_schema.sgml
+++ b/doc/src/sgml/information_schema.sgml
@@ -2898,18 +2898,6 @@ ORDER BY c.ordinal_position;
</row>
<row>
- <entry><literal>foreign_server_catalog</literal></entry>
- <entry><type>sql_identifier</type></entry>
- <entry>Name of the database that the foreign server is defined in (always the current database)</entry>
- </row>
-
- <row>
- <entry><literal>foreign_server_name</literal></entry>
- <entry><type>sql_identifier</type></entry>
- <entry>Name of the foreign server</entry>
- </row>
-
- <row>
<entry><literal>option_name</literal></entry>
<entry><type>sql_identifier</type></entry>
<entry>Name of an option</entry>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 23:25 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
@ 2015-06-01 00:27 ` Clément Prévost <[email protected]>
2016-08-03 19:05 ` Re: Documentation on information_ schema columns that does not exist Peter Eisentraut <[email protected]>
1 sibling, 1 reply; 9+ messages in thread
From: Clément Prévost @ 2015-06-01 00:27 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Peter Eisentraut <[email protected]>; pgsql-docs
Here is another patch to fix the name of the column
information_schema.routines.result_cast_char_set_name that was mistakenly
named result_cast_character_set_name.
regards, clément prévost
On 1 June 2015 at 01:25, Clément Prévost <[email protected]> wrote:
> Well spotted!
>
> I attached 2 patches: 1 to fix erroneous documentation and the other to
> fix information schema types.
>
> regards, clément prévost
>
> On 1 June 2015 at 00:14, Tom Lane <[email protected]> wrote:
>
>> I wrote:
>> > Another problem in the same area is that the column types of
>> > foreign_table_schema and foreign_table_name seem to be "name":
>>
>> Further pursuant to that, these are the information_schema columns
>> that don't seem to have been cast to the spec-required type:
>>
>> column_options | column_name | name
>> column_options | table_name | name
>> column_options | table_schema | name
>> foreign_table_options | foreign_table_name | name
>> foreign_table_options | foreign_table_schema | name
>> foreign_tables | foreign_table_name | name
>> foreign_tables | foreign_table_schema | name
>>
>> regards, tom lane
>>
>
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/octet-stream] conform-information-schema-routines-unused-field-to-spec.patch (866B, 3-conform-information-schema-routines-unused-field-to-spec.patch)
download | inline diff:
diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql
index b7aa3e3..5efed4f 100644
--- a/src/backend/catalog/information_schema.sql
+++ b/src/backend/catalog/information_schema.sql
@@ -1463,7 +1463,7 @@ CREATE VIEW routines AS
CAST(null AS cardinal_number) AS result_cast_char_octet_length,
CAST(null AS sql_identifier) AS result_cast_char_set_catalog,
CAST(null AS sql_identifier) AS result_cast_char_set_schema,
- CAST(null AS sql_identifier) AS result_cast_character_set_name,
+ CAST(null AS sql_identifier) AS result_cast_char_set_name,
CAST(null AS sql_identifier) AS result_cast_collation_catalog,
CAST(null AS sql_identifier) AS result_cast_collation_schema,
CAST(null AS sql_identifier) AS result_cast_collation_name,
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 23:25 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-06-01 00:27 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
@ 2016-08-03 19:05 ` Peter Eisentraut <[email protected]>
2016-08-03 19:27 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Peter Eisentraut @ 2016-08-03 19:05 UTC (permalink / raw)
To: Clément Prévost <[email protected]>; Tom Lane <[email protected]>; +Cc: pgsql-docs
On 5/31/15 8:27 PM, Clément Prévost wrote:
> Here is another patch to fix the name of the column
> information_schema.routines.result_cast_char_set_name that was
> mistakenly named result_cast_character_set_name.
This one is actually named result_cast_character_set_name in the
standard, although that might be a mistake. Anyway, our documentation
doesn't match our implementation, so one of them has to change.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 23:25 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-06-01 00:27 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2016-08-03 19:05 ` Re: Documentation on information_ schema columns that does not exist Peter Eisentraut <[email protected]>
@ 2016-08-03 19:27 ` Tom Lane <[email protected]>
2016-08-08 01:57 ` Re: Documentation on information_ schema columns that does not exist Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2016-08-03 19:27 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: Clément Prévost <[email protected]>; pgsql-docs
Peter Eisentraut <[email protected]> writes:
> On 5/31/15 8:27 PM, Clément Prévost wrote:
>> Here is another patch to fix the name of the column
>> information_schema.routines.result_cast_char_set_name that was
>> mistakenly named result_cast_character_set_name.
> This one is actually named result_cast_character_set_name in the
> standard, although that might be a mistake. Anyway, our documentation
> doesn't match our implementation, so one of them has to change.
Hm, yeah, I think I vote with the "it's a mistake" camp. The adjacent
columns are named "result_cast_char_set_whatever", and there are
occurrences of result_cast_char_set_name elsewhere, for example
in the method_specifications view.
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 23:25 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-06-01 00:27 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2016-08-03 19:05 ` Re: Documentation on information_ schema columns that does not exist Peter Eisentraut <[email protected]>
2016-08-03 19:27 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
@ 2016-08-08 01:57 ` Peter Eisentraut <[email protected]>
0 siblings, 0 replies; 9+ messages in thread
From: Peter Eisentraut @ 2016-08-08 01:57 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Clément Prévost <[email protected]>; pgsql-docs
On 8/3/16 3:27 PM, Tom Lane wrote:
> Peter Eisentraut <[email protected]> writes:
>> On 5/31/15 8:27 PM, Clément Prévost wrote:
>>> Here is another patch to fix the name of the column
>>> information_schema.routines.result_cast_char_set_name that was
>>> mistakenly named result_cast_character_set_name.
>
>> This one is actually named result_cast_character_set_name in the
>> standard, although that might be a mistake. Anyway, our documentation
>> doesn't match our implementation, so one of them has to change.
>
> Hm, yeah, I think I vote with the "it's a mistake" camp. The adjacent
> columns are named "result_cast_char_set_whatever", and there are
> occurrences of result_cast_char_set_name elsewhere, for example
> in the method_specifications view.
Fixed by changing the column name.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Documentation on information_ schema columns that does not exist
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 22:14 ` Re: Documentation on information_ schema columns that does not exist Tom Lane <[email protected]>
2015-05-31 23:25 ` Re: Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
@ 2016-08-03 18:59 ` Peter Eisentraut <[email protected]>
1 sibling, 0 replies; 9+ messages in thread
From: Peter Eisentraut @ 2016-08-03 18:59 UTC (permalink / raw)
To: Clément Prévost <[email protected]>; Tom Lane <[email protected]>; +Cc: pgsql-docs
On 5/31/15 7:25 PM, Clément Prévost wrote:
> I attached 2 patches: 1 to fix erroneous documentation and the other to
> fix information schema types.
I have fixed these two.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2016-08-08 01:57 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-05-31 21:40 Documentation on information_ schema columns that does not exist Clément Prévost <[email protected]>
2015-05-31 21:54 ` Tom Lane <[email protected]>
2015-05-31 22:14 ` Tom Lane <[email protected]>
2015-05-31 23:25 ` Clément Prévost <[email protected]>
2015-06-01 00:27 ` Clément Prévost <[email protected]>
2016-08-03 19:05 ` Peter Eisentraut <[email protected]>
2016-08-03 19:27 ` Tom Lane <[email protected]>
2016-08-08 01:57 ` Peter Eisentraut <[email protected]>
2016-08-03 18:59 ` Peter Eisentraut <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox