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: d8555e5
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: 2a55644
Choose a head ref
  • 4 commits
  • 7 files changed
  • 2 contributors

Commits on Apr 30, 2025

  1. soft error variant of ExecPrepareExpr, ExecInitExpr

    ExecInitExprSafe: soft error of ExecInitExpr.
    ExecPrepareExprSafe: soft error of ExecPrepareExpr.
    ExecPrepareExprSafe initialize for expression execution with soft error support.
    not all expression node support it. Like node CoerceToDomain support it.
    
    XXX more comments.
    
    discussion: https://postgr.es/m/CACJufxE_+iZBR1i49k_AHigppPwLTJi6km8NOsC7FWvKdEmmXg@mail.gmail.com
    jianhe-fun authored and Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    7cceb7c View commit details
    Browse the repository at this point in the history
  2. add function DomainHaveVolatileConstraints

    bool DomainHaveVolatileConstraints(Oid type_id, bool *have_volatile);
    
    Returns true if the Domain has any constraints.
    If you want check this domain have any volatile check constraints,
    make sure have_volatile is not NULL.
    
    discussion: https://postgr.es/m/CACJufxE_+iZBR1i49k_AHigppPwLTJi6km8NOsC7FWvKdEmmXg@mail.gmail.com
    jianhe-fun authored and Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    81c8bc5 View commit details
    Browse the repository at this point in the history
  3. fast default for domain with constraints

    This is primarily done by evaluating CoerceToDomain with soft error support.
    
    If we evaluate CoerceToDomain to false, in ATExecAddColumn, the defval node
    evaluation value cannot be cast to the domain.  However, in some scarenio we
    cannot fail at the Phase 2 stage in cases where the table is empty. For example,
    the to be added column is type of domain x, domain x is "check(value > 10) default 8".
    
    Therefore, if an error occurred while evaluation, do not raise the error,
    we signal Phase 3 to do table rewrite, error will be raised on Phase 3.
    
    Thanks to commit aaaf944[1],
    ExprState.escontext (ErrorSaveContext) was added, and ExecEvalConstraintNotNull,
    ExecEvalConstraintCheck were changed to use errsave instead of hard error.
    Now we can evaluate CoerceToDomain in a soft error way.
    
    However we do need table rewrite for domain with volatile check constraints.
    so there will be less surprising behavior.
    
    discussion: https://postgr.es/m/CACJufxE_+iZBR1i49k_AHigppPwLTJi6km8NOsC7FWvKdEmmXg@mail.gmail.com
    [1]: https://git.postgresql.org/cgit/postgresql.git/commit/?id=aaaf9449ec6be62cb0d30ed3588dc384f56274bf
    jianhe-fun authored and Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    bd9c26e View commit details
    Browse the repository at this point in the history
  4. [CF 5641] v4 - support fast default for domain with constraints

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5641
    
    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/CACJufxGs_A0mrq9StOFAkVnK9x1U_s0+KuybGKUt2VmspC90Hw@mail.gmail.com
    Author(s): Jian He
    Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    2a55644 View commit details
    Browse the repository at this point in the history
Loading