public inbox for [email protected]
help / color / mirror / Atom feeddocs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
4+ messages / 3 participants
[nested] [flat]
* docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
@ 2026-04-15 09:27 Daniel Westermann (DWE) <[email protected]>
2026-04-16 09:17 ` Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Yuchen Li <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Westermann (DWE) @ 2026-04-15 09:27 UTC (permalink / raw)
To: PostgreSQL Hackers <[email protected]>
Hi,
while reading https://www.postgresql.org/docs/devel/postgres-fdw.html I've noticed that there is a single bracket on one line of the CREATE FOREIGN TABLE example.
Browsing through other docs (e,g. https://www.postgresql.org/docs/devel/sql-createtable.html ) there doesn't seem to be a rule for that but if there is a single bracket (e.g. CREATE TABLE distributors), the options that follow usually start at position one and are not indented (or they follow directly after the bracket).
The examples in file_fdw (https://www.postgresql.org/docs/devel/file-fdw.html) follow a mix of options which directly follow the bracket and on a new line.
Attached a small patch which makes it looking a bit better, at least in my opinion.
Regards
Daniel
Attachments:
[text/x-patch] fix-create-foreign-table-example-format.patch (624B, 3-fix-create-foreign-table-example-format.patch)
download | inline diff:
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index b81f33732fb..bf54f8937c4 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -1470,9 +1470,9 @@ CREATE USER MAPPING FOR local_user
CREATE FOREIGN TABLE foreign_table (
id integer NOT NULL,
data text
-)
- SERVER foreign_server
- OPTIONS (schema_name 'some_schema', table_name 'some_table');
+)
+SERVER foreign_server
+OPTIONS (schema_name 'some_schema', table_name 'some_table');
</programlisting>
It's essential that the data types and other properties of the columns
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
2026-04-15 09:27 docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Daniel Westermann (DWE) <[email protected]>
@ 2026-04-16 09:17 ` Yuchen Li <[email protected]>
2026-04-16 10:20 ` Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Daniel Westermann (DWE) <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Yuchen Li @ 2026-04-16 09:17 UTC (permalink / raw)
To: Daniel Westermann (DWE) <[email protected]>; PostgreSQL Hackers <[email protected]>
On 4/15/2026 5:27 PM, Daniel Westermann (DWE) wrote:
> Hi,
>
> while reading https://www.postgresql.org/docs/devel/postgres-fdw.html
> <https://www.postgresql.org/docs/devel/postgres-fdw.html; I've noticed
> that there is a single bracket on one line of the CREATE FOREIGN TABLE
> example.
>
> Browsing through other docs (e,g.
> https://www.postgresql.org/docs/devel/sql-createtable.html
> <https://www.postgresql.org/docs/devel/sql-createtable.html> ) there
> doesn't seem to be a rule for that but if there is a single bracket
> (e.g. CREATE TABLE distributors), the options that follow usually
> start at position one and are not indented (or they follow directly
> after the bracket).
>
> The examples in file_fdw
> (https://www.postgresql.org/docs/devel/file-fdw.html) follow a mix of
> options which directly follow the bracket and on a new line.
>
> Attached a small patch which makes it looking a bit better, at least
> in my opinion.
>
> Regards
> Daniel
While looking through the patch, I noticed a small formatting issue in
the following part:
+)
+SERVER foreign_server
+OPTIONS (schema_name 'some_schema', table_name 'some_table');
The added +) line appears to have a trailing space after the closing
parenthesis.
Regards,
Yuchen Li
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
2026-04-15 09:27 docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Daniel Westermann (DWE) <[email protected]>
2026-04-16 09:17 ` Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Yuchen Li <[email protected]>
@ 2026-04-16 10:20 ` Daniel Westermann (DWE) <[email protected]>
2026-04-17 21:53 ` Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Michael Paquier <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Westermann (DWE) @ 2026-04-16 10:20 UTC (permalink / raw)
To: Yuchen Li <[email protected]>; PostgreSQL Hackers <[email protected]>
>+)
>+SERVER foreign_server
>+OPTIONS (schema_name 'some_schema', table_name 'some_table');
>The added +) line appears to have a trailing space after the closing
>parenthesis.
Fixed, thank you.
Regards
Daniel
Attachments:
[text/x-patch] fix-create-foreign-table-example-format_v2.patch (584B, 3-fix-create-foreign-table-example-format_v2.patch)
download | inline diff:
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index b81f33732fb..74c66fb6110 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -1471,8 +1471,8 @@ CREATE FOREIGN TABLE foreign_table (
id integer NOT NULL,
data text
)
- SERVER foreign_server
- OPTIONS (schema_name 'some_schema', table_name 'some_table');
+SERVER foreign_server
+OPTIONS (schema_name 'some_schema', table_name 'some_table');
</programlisting>
It's essential that the data types and other properties of the columns
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
2026-04-15 09:27 docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Daniel Westermann (DWE) <[email protected]>
2026-04-16 09:17 ` Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Yuchen Li <[email protected]>
2026-04-16 10:20 ` Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Daniel Westermann (DWE) <[email protected]>
@ 2026-04-17 21:53 ` Michael Paquier <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Michael Paquier @ 2026-04-17 21:53 UTC (permalink / raw)
To: Daniel Westermann (DWE) <[email protected]>; +Cc: Yuchen Li <[email protected]>; PostgreSQL Hackers <[email protected]>
On Thu, Apr 16, 2026 at 10:20:02AM +0000, Daniel Westermann (DWE) wrote:
> >The added +) line appears to have a trailing space after the closing
> >parenthesis.
>
> Fixed, thank you.
While the grammar of the query itself is correct, I agree that this is
a beautification worth it. Not correcting a problem, just easier for
the eye, so why not :)
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-04-17 21:53 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-15 09:27 docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw Daniel Westermann (DWE) <[email protected]>
2026-04-16 09:17 ` Yuchen Li <[email protected]>
2026-04-16 10:20 ` Daniel Westermann (DWE) <[email protected]>
2026-04-17 21:53 ` Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox