file-fdw and force_null - Mailing list pgsql-docs

From Boshomi Phenix
Subject file-fdw and force_null
Date
Msg-id CAJVkCUparn4_Oarernm=U6LWVsTkecKcALHtwGr5M3qJRj_czw@mail.gmail.com
Whole thread Raw
Responses Re: file-fdw and force_null
List pgsql-docs
Hello Friends

I tried to create a file-fdw foreign table with force_null for some columns.
FORCE_NULL syntax differs from COPY. For me it was not clear that the "OPTIONS" keyword by the column was necessary, so it would be nice to add this to the example.


DROP FOREIGN TABLE IF EXISTS testforcenull;
CREATE FOREIGN TABLE testforcenull
( cola text NOT NULL,
  colb text,
  colc text OPTIONS(FORCE_NULL 'true')
  ) SERVER bevcsv
    OPTIONS (filename '~/testforcenull.csv',
       FORMAT 'csv',
       HEADER 'true',  
       DELIMITER ';',
       QUOTE '"'  
       );

best regards


pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Remove obsolete mention of backslashes as escapes
Next
From: Daniel Gustafsson
Date:
Subject: Re: file-fdw and force_null