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/5617~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/5617
Choose a head ref
  • 3 commits
  • 8 files changed
  • 2 contributors

Commits on Apr 5, 2025

  1. Improve API for retrieving data from read streams.

    Dealing with the per_buffer_data argument to read_stream_next_buffer()
    has proven a bit clunky.  Provide some new wrapper functions/macros:
    
        buffer = read_stream_get_buffer(rs);
        buffer = read_stream_get_buffer_and_value(rs, &my_int);
        buffer = read_stream_get_buffer_and_pointer(rs, &my_pointer_to_int);
    
    These improve readability and type safety via assertions.
    macdice authored and Commitfest Bot committed Apr 5, 2025
    Configuration menu
    Copy the full SHA
    f819ff0 View commit details
    Browse the repository at this point in the history
  2. Improve API for storing data in read streams.

    Read stream callbacks receive a void pointer into the per-buffer data
    queue so that can store data there for later retrieval by the buffer
    consumer.  We can improve readability and safety a bit by changing
    cast-and-assign or raw memcpy() to:
    
    	read_stream_put_value(stream, per_buffer_data, my_int);
    
    This form infers the size and asserts that the storage space matches,
    generally mirroring the read_stream_get_buffer_and_value() call used for
    retrieving the streamed data later.
    macdice authored and Commitfest Bot committed Apr 5, 2025
    Configuration menu
    Copy the full SHA
    c480724 View commit details
    Browse the repository at this point in the history
  3. [CF 5617] v2 - Beautify read stream "per buffer data" APIs

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5617
    
    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/CA+hUKGLa7ba7USyT+JR7uRiawWeCVJ96wyRsoEXk7r2gngPv=A@mail.gmail.com
    Author(s): Thomas Munro
    Commitfest Bot committed Apr 5, 2025
    Configuration menu
    Copy the full SHA
    aa9a2a7 View commit details
    Browse the repository at this point in the history
Loading