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

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
Дата
Msg-id CAD21AoC1xqV2HhzZadMKg_PF0z_OXTSra7p5pgnh4ShdzPVLSQ@mail.gmail.com
обсуждение исходный текст
Ответ на The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html  (PG Doc comments form <noreply@postgresql.org>)
Ответы Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html  ("Xiong He" <iihero@qq.com>)
Список pgsql-docs
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 по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: PostgreSQL 15 minor fixes in protocol.sgml
Следующее
От: "Xiong He"
Дата:
Сообщение: Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html