Documentation on information_ schema columns that does not exist

Started by Clément Prévostalmost 11 years ago9 messagesdocs
Jump to latest
#1Clément Prévost
prevostclement@gmail.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Clément Prévost (#1)
Re: Documentation on information_ schema columns that does not exist

=?UTF-8?B?Q2zDqW1lbnQgUHLDqXZvc3Q=?= <prevostclement@gmail.com> 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 (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tom Lane (#2)
Re: Documentation on information_ schema columns that does not exist

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 (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#4Clément Prévost
prevostclement@gmail.com
In reply to: Tom Lane (#3)
Re: Documentation on information_ schema columns that does not exist

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 <tgl@sss.pgh.pa.us> wrote:

Show quoted text

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

Attachments:

conform-information-schema-foreign-table-column-type-to-spec.patchapplication/octet-stream; name=conform-information-schema-foreign-table-column-type-to-spec.patchDownload+5-5
remove-invalid-information-schema-doc.patchapplication/octet-stream; name=remove-invalid-information-schema-doc.patchDownload+0-12
#5Clément Prévost
prevostclement@gmail.com
In reply to: Clément Prévost (#4)
Re: Documentation on information_ schema columns that does not exist

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 <prevostclement@gmail.com> wrote:

Show quoted text

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 <tgl@sss.pgh.pa.us> 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

Attachments:

conform-information-schema-routines-unused-field-to-spec.patchapplication/octet-stream; name=conform-information-schema-routines-unused-field-to-spec.patchDownload+1-1
#6Peter Eisentraut
peter_e@gmx.net
In reply to: Clément Prévost (#4)
Re: Documentation on information_ schema columns that does not exist

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 (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Clément Prévost (#5)
Re: Documentation on information_ schema columns that does not exist

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 (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#7)
Re: Documentation on information_ schema columns that does not exist

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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 (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#9Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#8)
Re: Documentation on information_ schema columns that does not exist

On 8/3/16 3:27 PM, Tom Lane wrote:

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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 (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs