Thread

Commits

  1. ALTER TABLE ... ALTER COLUMN ... DROP EXPRESSION

  1. ALTER TABLE support for dropping generation expression

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2019-12-09T07:53:54Z

    A small add-on to the generated columns feature:  Add an ALTER TABLE 
    subcommand for dropping the generated property from a column, per SQL 
    standard.
    
    -- 
    Peter Eisentraut              http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
  2. Re: ALTER TABLE support for dropping generation expression

    Sergei Kornilov <sk@zsrv.org> — 2019-12-25T11:01:34Z

    The following review has been posted through the commitfest application:
    make installcheck-world:  not tested
    Implements feature:       tested, failed
    Spec compliant:           not tested
    Documentation:            tested, passed
    
    Hello
    
    Patch does not apply to master. Could you rebase?
    
    Code looks good and very similar to "ALTER TABLE ... ALTER COLUMN ... DROP IDENTITY"
    
    I noticed one bug:
    
    create table testdrop (i int, b int, m int GENERATED ALWAYS AS ( i*2) stored);
    insert into testdrop(i,b) values (3,4);
    alter table testdrop alter COLUMN m drop expression ;
    alter table testdrop drop column i;
    
    Here is no "m" column anymore. Possible due some forgotten dependency?
    
    regards, Sergei
    
    The new status of this patch is: Waiting on Author
    
  3. Re: ALTER TABLE support for dropping generation expression

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2019-12-28T17:05:28Z

    On 2019-12-25 12:01, Sergei Kornilov wrote:
    > Patch does not apply to master. Could you rebase?
    
    done
    
    > I noticed one bug:
    > 
    > create table testdrop (i int, b int, m int GENERATED ALWAYS AS ( i*2) stored);
    > insert into testdrop(i,b) values (3,4);
    > alter table testdrop alter COLUMN m drop expression ;
    > alter table testdrop drop column i;
    > 
    > Here is no "m" column anymore. Possible due some forgotten dependency?
    
    fixed -- good catch
    
    -- 
    Peter Eisentraut              http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
  4. Re: ALTER TABLE support for dropping generation expression

    Sergei Kornilov <sk@zsrv.org> — 2020-01-10T12:20:38Z

    Hello
    
    Thank you, but I am late: patch has another merge conflict.
    
    Conflict seems trivial and patch looks fine for me.
    
    regards, Sergei
    
    
    
    
  5. Re: ALTER TABLE support for dropping generation expression

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2020-01-11T06:35:44Z

    On 2020-01-10 13:20, Sergei Kornilov wrote:
    > Thank you, but I am late: patch has another merge conflict.
    > 
    > Conflict seems trivial and patch looks fine for me.
    
    Here is another patch version.  I have resolved the conflict and also 
    added a check that you don't drop the generation expression from an 
    inherited column.
    
    -- 
    Peter Eisentraut              http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
  6. Re: ALTER TABLE support for dropping generation expression

    Sergei Kornilov <sk@zsrv.org> — 2020-01-13T09:56:41Z

    The following review has been posted through the commitfest application:
    make installcheck-world:  tested, passed
    Implements feature:       tested, passed
    Spec compliant:           not tested
    Documentation:            tested, passed
    
    Thank you!
    Looks good to me. I have no further comments. I'll mark as ready for committer.
    
    The new status of this patch is: Ready for Committer
    
  7. Re: ALTER TABLE support for dropping generation expression

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2020-01-14T12:47:14Z

    On 2020-01-13 10:56, Sergei Kornilov wrote:
    > The following review has been posted through the commitfest application:
    > make installcheck-world:  tested, passed
    > Implements feature:       tested, passed
    > Spec compliant:           not tested
    > Documentation:            tested, passed
    > 
    > Thank you!
    > Looks good to me. I have no further comments. I'll mark as ready for committer.
    > 
    > The new status of this patch is: Ready for Committer
    
    committed, thanks
    
    -- 
    Peter Eisentraut              http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services