Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51908a3

Browse files
doc: Add example for how to set file_fdw column option
The documentation is pretty light on how to set column optionson foreign tables, and the file_fdw docs refer to COPY whendocumenting force_null even though it's not used in the sameway. Add a small example to describe how to use it.Reported-by: Boshomi Phenix <boshomi@gmail.com>Discussion:https://postgr.es/m/CAJVkCUparn4_Oarernm=U6LWVsTkecKcALHtwGr5M3qJRj_czw@mail.gmail.com
1 parenta0a5e0f commit51908a3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎doc/src/sgml/file-fdw.sgml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,20 @@ OPTIONS ( filename 'log/pglog.csv', format 'csv' );
279279
</para>
280280
</example>
281281

282+
<example>
283+
<title>Create a Foreign Table with an option on a column</title>
284+
<para>
285+
To set the <literal>force_null</literal> option for a column, use the
286+
<literal>OPTIONS</literal> keyword.
287+
</para>
288+
<programlisting>
289+
CREATE FOREIGN TABLE films (
290+
code char(5) NOT NULL,
291+
title text NOT NULL,
292+
rating text OPTIONS (force_null 'true')
293+
) SERVER film_server
294+
OPTIONS ( filename 'films/db.csv', format 'csv' );
295+
</programlisting>
296+
</example>
297+
282298
</sect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp