Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw - Mailing list pgsql-hackers

From Yuchen Li
Subject Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
Date
Msg-id 0e537c2a-0575-48c8-a9ac-78030f36a1ef@163.com
Whole thread
In response to docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw  ("Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>)
Responses Re: docs: Fix format of CREATE FOREIGN TABLE example in postgres_fdw
List pgsql-hackers
On 4/15/2026 5:27 PM, Daniel Westermann (DWE) wrote:
P {margin-top:0;margin-bottom:0;}
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

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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Reduce build times of pg_trgm GIN indexes
Next
From: Amit Langote
Date:
Subject: Re: Reject invalid databases in pg_get_database_ddl()