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

Reply via email to