pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedThe sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
3+ messages / 3 participants
[nested] [flat]
* The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
@ 2022-08-03 13:29 PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Doc comments form @ 2022-08-03 13:29 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: iihero@qq.com
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
@ 2022-08-04 08:09 Masahiko Sawada <sawada.mshk@gmail.com>
parent: PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Masahiko Sawada @ 2022-08-04 08:09 UTC (permalink / raw)
To: iihero@qq.com; pgsql-docs@lists.postgresql.org
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/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
@ 2022-08-04 15:14 =?ISO-8859-1?B?WGlvbmcgSGU=?= <iihero@qq.com>
parent: Masahiko Sawada <sawada.mshk@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Xiong He @ 2022-08-04 15:14 UTC (permalink / raw)
To: Masahiko Sawada <sawada.mshk@gmail.com>; pgsql-docs <pgsql-docs@lists.postgresql.org>
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/
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-08-04 15:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 13:29 The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html PG Doc comments form <noreply@postgresql.org>
2022-08-04 08:09 ` Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html Masahiko Sawada <sawada.mshk@gmail.com>
2022-08-04 15:14 ` Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html =?ISO-8859-1?B?WGlvbmcgSGU=?= <iihero@qq.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox