Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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/5725~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/5725
Choose a head ref
  • 4 commits
  • 13 files changed
  • 2 contributors

Commits on May 31, 2025

  1. rename ExecComputeStoredGenerated to ExecComputeGenerated

    to support virtual generated column over domain type, we actually need compute
    the virtual generated expression. we did it at ExecComputeGenerated for stored,
    we can use it for virtual.  so do the rename.
    
    discussion: https://postgr.es/m/CACJufxFNUHxuSE=g20C2aLO3d+4T_j9h0x8esMirzcC4FrLbBg@mail.gmail.com
    jianhe-fun authored and Commitfest Bot committed May 31, 2025
    Configuration menu
    Copy the full SHA
    7c4ccb0 View commit details
    Browse the repository at this point in the history
  2. soft error variant of ExecPrepareExpr, ExecInitExpr

    Introduce function ExecPrepareExprSafe and ExecInitExprSafe.
    ExecPrepareExprSafe initialize for expression execution with soft error support.
    not all expression node support it. some like CoerceToDomain do support it.
    
    discussion: https://postgr.es/m/CACJufxFNUHxuSE=g20C2aLO3d+4T_j9h0x8esMirzcC4FrLbBg@mail.gmail.com
    jianhe-fun authored and Commitfest Bot committed May 31, 2025
    Configuration menu
    Copy the full SHA
    d563931 View commit details
    Browse the repository at this point in the history
  3. domain over virtual generated column

    domains that don't have constraints work just fine.  domain constraints check
    happen within ExecComputeGenerated.  we compute the virtual generated column in
    ExecComputeGenerated and discarded the value.  if value cannot coerce to domain
    then we will error out.
    
    domain_with_constaint can be element type of range, multirange, array,
    composite. To be bulletproof, if this column type is not type of TYPTYPE_BASE or
    it's an array type, then we do actually compute the virtual generated
    expression.  This can have negative performance for some INSERTs.  The following
    two query shows in pg_catalog, most of the system type is TYPTYPE_BASE.  So I
    guess this compromise is fine.
    
    select count(*),typtype from pg_type
    where typnamespace = 'pg_catalog'::regnamespace
    group by 2 order by 1 desc;
    
    ALTER DOMAIN ADD CONSTRAINT is supported for virtual generated column.
    
    ALTER TABLE ADD VIRTUAL GENERATED COLUMN.
    need table scan to verify new column generation expression value
    satisfied the domain constraints. but no need table rewrite.
    
    discussion: https://postgr.es/m/CACJufxFNUHxuSE=g20C2aLO3d+4T_j9h0x8esMirzcC4FrLbBg@mail.gmail.com
    jianhe-fun authored and Commitfest Bot committed May 31, 2025
    Configuration menu
    Copy the full SHA
    963e8b9 View commit details
    Browse the repository at this point in the history
  4. [CF 5725] v2 - domain over virtual generated column

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5725
    
    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/CACJufxEQopHp0ZTrKtnFXQ1U9oWd2=35oShV3TSK=roYPsC+Dw@mail.gmail.com
    Author(s): Jian He
    Commitfest Bot committed May 31, 2025
    Configuration menu
    Copy the full SHA
    a195f55 View commit details
    Browse the repository at this point in the history
Loading