Thread

Commits

  1. Clarify referential actions in docs of CREATE/ALTER TABLE

  1. Alter table documentation page (again)

    Lætitia Avrot <laetitia.avrot@gmail.com> — 2018-12-06T17:30:02Z

    Hi,
    
    I was trying to answer a former colleague question about postgres' default
    behaviour when deleting or updating when she pointed out that Postgres
    alter table documentation page used twice the 'action' keywords for two
    different things.
    
    And indeed she is right :
    - it's used to described any action actionable with ALTER TABLE statement
    - and also to reference action taken on update or delete
    
    Here are my thoughts about that conflict :
    - We should keep the action keyword for on update or on delete action as
    it's what's done on the CREATE TABLE documentation page.
    - Option 1: We could either categorized the "actions" we can do with ALTER
    TABLE (as column_action, trigger_action, constraint_action, rule_action,
    other_action), but I'm not a big fan of "other_action" and I can't think of
    another name
    - Option 2: Or we could just rename the first action as "alter-table_action"
    
    Any thought ? Which option do you prefer ? I can write the patch, but I'd
    like to know what you think about that.
    
    Anyway, thanks to Brigitte Blanc-Lafay tohave pointed this out! :-)
    
    Cheers,
    
    Lætitia
    -- 
    *Think! Do you really need to print this email ? *
    *There is no Planet B.*
    
  2. Re: Alter table documentation page (again)

    Alvaro Herrera <alvherre@2ndquadrant.com> — 2018-12-06T18:03:20Z

    On 2018-Dec-06, Lætitia Avrot wrote:
    
    > Any thought ? Which option do you prefer ? I can write the patch, but I'd
    > like to know what you think about that.
    
    I'd rename the action in ON DELETE/UPDATE to referential_action, both in
    alter_table and in create_table (the latter just for consistency).
    
    -- 
    Álvaro Herrera                https://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
  3. Re: Alter table documentation page (again)

    Lætitia Avrot <laetitia.avrot@gmail.com> — 2018-12-06T20:00:14Z

    >
    >
    > I'd rename the action in ON DELETE/UPDATE to referential_action, both in
    > alter_table and in create_table (the latter just for consistency).
    >
    
    I love that "option 3" !  So clever!
    
  4. Re: Alter table documentation page (again)

    Alvaro Herrera <alvherre@2ndquadrant.com> — 2018-12-06T20:05:34Z

    On 2018-Dec-06, Lætitia Avrot wrote:
    
    > > I'd rename the action in ON DELETE/UPDATE to referential_action, both in
    > > alter_table and in create_table (the latter just for consistency).
    > 
    > I love that "option 3" !  So clever!
    
    Thanks :-)  I checked the SQL standard after sending that email, and
    indeed it calls those elements <referential action>.  Go figure.
    
    -- 
    Álvaro Herrera                https://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
  5. Re: Alter table documentation page (again)

    Lætitia Avrot <laetitia.avrot@gmail.com> — 2018-12-07T18:48:39Z

    Hi all,
    
    Here's the patch.
    The patch should apply to MASTER. I built and tested it successfully on my
    laptop.
    
    I'll add it to January's commitfest.
    
    Cheers,
    
    Lætitia
    
  6. Re: Alter table documentation page (again)

    Michael Paquier <michael@paquier.xyz> — 2018-12-26T04:46:48Z

    On Fri, Dec 07, 2018 at 07:48:39PM +0100, Lætitia Avrot wrote:
    > Here's the patch.
    > The patch should apply to MASTER. I built and tested it successfully on my
    > laptop.
    > 
    > I'll add it to January's commitfest.
    
    What's proposed here looks good to me, and all the grounds are
    covered, so I am switching the patch as ready for committer.
    
    Álvaro, perhaps you would prefer committing it yourself?
    --
    Michael
    
  7. Re: Alter table documentation page (again)

    Michael Paquier <michael@paquier.xyz> — 2018-12-28T01:20:52Z

    On Wed, Dec 26, 2018 at 01:46:48PM +0900, Michael Paquier wrote:
    > What's proposed here looks good to me, and all the grounds are
    > covered, so I am switching the patch as ready for committer.
    
    And committed, mentioning on the way Brigitte for the report.
    --
    Michael
    
  8. Re: Alter table documentation page (again)

    Alvaro Herrera <alvherre@2ndquadrant.com> — 2018-12-28T03:36:27Z

    On 2018-Dec-28, Michael Paquier wrote:
    
    > On Wed, Dec 26, 2018 at 01:46:48PM +0900, Michael Paquier wrote:
    > > What's proposed here looks good to me, and all the grounds are
    > > covered, so I am switching the patch as ready for committer.
    > 
    > And committed, mentioning on the way Brigitte for the report.
    
    Thanks, I was not paying attention here.
    
    -- 
    Álvaro Herrera                https://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services