Thread

Commits

  1. doc: Add example for how to set file_fdw column option

  1. file-fdw and force_null

    Boshomi Phenix <boshomi@gmail.com> — 2023-09-11T14:28:50Z

    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
    
  2. Re: file-fdw and force_null

    Daniel Gustafsson <daniel@yesql.se> — 2023-09-12T10:25:26Z

    > On 11 Sep 2023, at 16:28, Boshomi Phenix <boshomi@gmail.com> wrote:
    
    > 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.
    
    Considering that we don't really have the OPTIONS syntax documented in an
    example, and that we reference COPY heavily on this page, I tend to agree.
    How about the attached?
    
    Looking at this it's a bit odd that we use <example> here which is very
    infrequently used.  It might be worth replacing this to make the docs more
    uniform, but that's for another patch (and thread), for now it's using the same
    syntax already present here.
    
    --
    Daniel Gustafsson
    
    
  3. Re: file-fdw and force_null

    Boshomi Phenix <boshomi@gmail.com> — 2023-09-13T20:10:34Z

    Am Di., 12. Sept. 2023 um 12:25 Uhr schrieb Daniel Gustafsson <
    daniel@yesql.se>:
    
    >
    > Considering that we don't really have the OPTIONS syntax documented in an
    > example, and that we reference COPY heavily on this page, I tend to agree.
    > How about the attached?
    >
    >
    Yes, this looks good to me.
    
    Thank you!
    
  4. Re: file-fdw and force_null

    Daniel Gustafsson <daniel@yesql.se> — 2023-09-18T13:16:09Z

    > On 13 Sep 2023, at 22:10, Boshomi Phenix <boshomi@gmail.com> wrote:
    > 
    > Am Di., 12. Sept. 2023 um 12:25 Uhr schrieb Daniel Gustafsson <daniel@yesql.se <mailto:daniel@yesql.se>>:
    > 
    > Considering that we don't really have the OPTIONS syntax documented in an
    > example, and that we reference COPY heavily on this page, I tend to agree.
    > How about the attached?
    > 
    > Yes, this looks good to me. 
    
    I've applied this today, thanks for the report.
    
    --
    Daniel Gustafsson