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

Поиск
Список
Период
Сортировка
От Xiong He
Тема Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
Дата
Msg-id tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com
обсуждение исходный текст
Ответ на 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
Oh, I double checked.  Looks like the content in 14 is correct.  It has two more columns:
   leader_pid integer,
  query_id bigint
than the previous version.

I think I tested the content in:  http://postgres.cn/docs/14/file-fdw.html 
Seems it's the content not updated in that site.

Thanks for your reminding. 

Regards,
Xiong He [iihero] 

 


------------------ Original ------------------
From: "Masahiko Sawada" <sawada.mshk@gmail.com>;
Date: Thu, Aug 4, 2022 04:09 PM
To: "Xiong He"<iihero@qq.com>;"pgsql-docs"<pgsql-docs@lists.postgresql.org>;
Subject: Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html

On Wed, Aug 3, 2022 at 10:48 PM PG Doc comments form
<noreply@postgresql.org> wrote:
>
> 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.

You said you added 2 extra columns to the example in PG14 doc but both
pglog table definitions you mentioned above have the same number of
columns, 26. The first table definition worked with PG14 in my
environment. Could you try using the first example again and share the
error message if an error occurs?

Regards,

--
Masahiko Sawada
EDB:  https://www.enterprisedb.com/

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
Следующее
От: PG Doc comments form
Дата:
Сообщение: 34.16. The Password File error re windows pgpass.conf location