The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
Дата
Msg-id 165953339809.43641.11613668155724201455@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/appendixes.html
Description:

Dear All, 
CREATE FOREIGN TABLE pglog (
  log_time timestamp(3) with time zone,
  user_name text,
  database_name text,
  process_id integer,
  connection_from text,
  session_id text,
  session_line_num bigint,
  command_tag text,
  session_start_time timestamp with time zone,
  virtual_transaction_id text,
  transaction_id bigint,
  error_severity text,
  sql_state_code text,
  message text,
  detail text,
  hint text,
  internal_query text,
  internal_query_pos integer,
  context text,
  query text,
  query_pos integer,
  location text,
  application_name text,
  backend_type text,
  leader_pid integer,
  query_id bigint
) SERVER pglog
OPTIONS ( filename 'log/pglog.csv', format 'csv' );

If we use pg14 as the server,  this example will not work. 
I just tried adding 2 extra columns, finally it can work.
see below:

CREATE FOREIGN TABLE pglog (
  log_time timestamp(3) with time zone,
  user_name text,
  database_name text,
  process_id integer,
  connection_from text,
  session_id text,
  session_line_num bigint,
  command_tag text,
  session_start_time timestamp with time zone,
  virtual_transaction_id text,
  transaction_id bigint,
  error_severity text,
  sql_state_code text,
  message text,
  detail text,
  hint text,
  internal_query text,
  internal_query_pos integer,
  context text,
  query text,
  bbb text,
  query_pos integer,
  location text,
  application_name text,
  backend_type text,
  ccc integer
) SERVER pglog_server
OPTIONS ( filename 'log/pglog.csv', format 'csv' );

There is a "bbb" and "ccc" to by pass the error.  In fact, it need dev of PG
to provide the valid meaningful column names there.  
Just suggest update this page to reflect the change.  Otherwise the user
will be confused why it can't work and will try to find which columns are
missing there.

В списке pgsql-docs по дате отправления:

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Usage instructions for pg_hba.conf file
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: PostgreSQL 15 minor fixes in protocol.sgml