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

Commits on Oct 13, 2025

  1. allow change generated expression while check constraint on it

    currently, if we have check constraints over virtual generated column
    then we can not change the generation expression.
    for example:
    CREATE TABLE gtest20 (a int, b int GENERATED ALWAYS AS (a * 2) VIRTUAL CHECK (b < 50));
    INSERT INTO gtest20 (a) VALUES (10);
    ALTER TABLE gtest20 ALTER COLUMN b SET EXPRESSION AS (a * 3); --error
    
    attached patch try to resolve this issue.
    
    main gotcha is in ATExecSetExpression, RememberAllDependentForRebuilding will do
    all the work.  also add a test for ALTER TABLE SET EXPRESSION for virtual
    generated column will not do table rewrite.
    
    discussion: https://postgr.es/m/CACJufxH3VETr7orF5rW29GnDk3n1wWbOE3WdkHYd3iPGrQ9E_A@mail.gmail.com
    commitfest: https://commitfest.postgresql.org/patch/5645/
    jianhe-fun authored and Commitfest Bot committed Oct 13, 2025
    Configuration menu
    Copy the full SHA
    0ddd6ac View commit details
    Browse the repository at this point in the history
  2. [CF 5645] v2 - support ALTER COLUMN SET EXPRESSION over virtual gener…

    …ated column with check constraint
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5645
    
    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/CACJufxExe7+Gh5MKMFiN5xwwmPXaaZC1jjQOFuovv8Q7b1LgFw@mail.gmail.com
    Author(s): Jian He
    Commitfest Bot committed Oct 13, 2025
    Configuration menu
    Copy the full SHA
    f7597d3 View commit details
    Browse the repository at this point in the history
Loading