Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/4681~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/4681
Choose a head ref
  • 6 commits
  • 33 files changed
  • 3 contributors

Commits on Mar 27, 2025

  1. Export CopyDest as private data

    This is a preparation to export CopyToStateData as private data.
    
    CopyToStateData depends on CopyDest. So we need to export CopyDest
    too.
    
    But CopyDest and CopySource has the same names. So we can't export
    CopyDest as-is.
    
    This uses the COPY_DEST_ prefix for CopyDest enum values. CopySource
    uses the COPY_FROM_ prefix for consistency.
    kou authored and Commitfest Bot committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    63edca6 View commit details
    Browse the repository at this point in the history
  2. Add support for adding custom COPY format

    This uses the handler approach like tablesample. The approach creates
    an internal function that returns an internal struct. In this case,
    a handler returns a CopyToRoutine for COPY TO and a CopyFromRoutine
    for COPY FROM.
    
    Whether COPY TO or COPY FROM is passed as the "is_from" argument:
    
        copy_handler(true) returns CopyToRoutine
        copy_handler(false) returns CopyFromRoutine
    
    This also add a test module for custom COPY handler.
    kou authored and Commitfest Bot committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    0255f99 View commit details
    Browse the repository at this point in the history
  3. Add support for implementing custom COPY handler as extension

    * TO: Add CopyToStateData::opaque that can be used to keep
      data for custom COPY TO handler implementation
    * TO: Export CopySendEndOfRow() to send end of row data as
      CopyToStateFlush()
    * FROM: Add CopyFromStateData::opaque that can be used to
      keep data for custom COPY FROM handler implementation
    * FROM: Export CopyGetData() to get the next data as
      CopyFromStateGetData()
    * FROM: Add CopyFromSkipErrorRow() for "ON_ERROR stop" and
      "LOG_VERBOSITY verbose"
    
    COPY FROM extensions must call CopyFromSkipErrorRow() when
    CopyFromOneRow callback reports an error by
    errsave(). CopyFromSkipErrorRow() handles "ON_ERROR stop" and
    "LOG_VERBOSITY verbose" cases.
    kou authored and Commitfest Bot committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    1cba73c View commit details
    Browse the repository at this point in the history
  4. Use copy handlers for built-in formats

    This adds copy handlers for text, csv and binary. We can simplify
    Copy{To,From}GetRoutine() by this. We'll be able to remove
    CopyFormatOptions::{binary,csv_mode} when we add more callbacks to
    Copy{To,From}Routine and move format specific routines to
    Copy{To,From}Routine::*.
    kou authored and Commitfest Bot committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    079a67b View commit details
    Browse the repository at this point in the history
  5. Add document how to write a COPY handler

    This is WIP because we haven't decided our API yet.
    
    Co-authored-by: David G. Johnston <[email protected]>
    2 people authored and Commitfest Bot committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    c973177 View commit details
    Browse the repository at this point in the history
  6. [CF 4681] v39 - Make COPY format extendable: Extract COPY TO format i…

    …mplementations
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/4681
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/[email protected]
    Author(s): Kouhei Sutou
    Commitfest Bot committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    573cf96 View commit details
    Browse the repository at this point in the history
Loading