Thread

Commits

  1. Rename columns in new pg_statistic_ext catalog

  1. pg_statistic_ext.staenabled might not be the best column name

    David Rowley <david.rowley@2ndquadrant.com> — 2017-04-12T13:36:43Z

    I'd been thinking that staenabled is not the most suitable column name
    for storing the types of statistics that are defined for the extended
    statistics.  For me, this indicates that something can be disabled,
    but there's no syntax for that, and even if there was, if we were to
    enable/disable the kinds, we'd likely want to keep tabs on which kinds
    were originally defined, otherwise it's more of an ADD and DROP than
    an ENABLE/DISABLE.
    
    "stakind" seems like a better name. I'd have personally gone with
    "statype" but pg_statistic already thinks stakind is better.
    
    A patch which changes this is attached
    
    -- 
     David Rowley                   http://www.2ndQuadrant.com/
     PostgreSQL Development, 24x7 Support, Training & Services
    
  2. Re: pg_statistic_ext.staenabled might not be the best column name

    Robert Haas <robertmhaas@gmail.com> — 2017-04-12T20:57:29Z

    On Wed, Apr 12, 2017 at 9:36 AM, David Rowley
    <david.rowley@2ndquadrant.com> wrote:
    > I'd been thinking that staenabled is not the most suitable column name
    > for storing the types of statistics that are defined for the extended
    > statistics.
    
    +1.
    
    -- 
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company
    
    
    
  3. Re: pg_statistic_ext.staenabled might not be the best column name

    Tomas Vondra <tomas.vondra@2ndquadrant.com> — 2017-04-12T23:37:17Z

    
    On 04/12/2017 03:36 PM, David Rowley wrote:
    > 
    > "stakind" seems like a better name. I'd have personally gone with
    > "statype" but pg_statistic already thinks stakind is better.
    
    +1 to stakind
    
    -- 
    Tomas Vondra                  http://www.2ndQuadrant.com
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
  4. Re: pg_statistic_ext.staenabled might not be the best column name

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-04-13T12:28:06Z

    Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
    > On 04/12/2017 03:36 PM, David Rowley wrote:
    >> "stakind" seems like a better name. I'd have personally gone with
    >> "statype" but pg_statistic already thinks stakind is better.
    
    > +1 to stakind
    
    I agree with that, but as long as we're rethinking column names here,
    was it a good idea to use the same "sta" prefix in pg_statistic_ext
    as in pg_statistic?  I do not think there's anyplace else where we're
    using the same table-identifying prefix in two different catalogs,
    and it seems a little pointless to follow that convention at all if
    we're not going to make it a unique prefix.
    
    We could go with "ste" perhaps, or break the convention of 3-character
    prefixes and go with "stae".
    
    			regards, tom lane
    
    
    
  5. Re: pg_statistic_ext.staenabled might not be the best column name

    Heikki Linnakangas <hlinnaka@iki.fi> — 2017-04-13T12:37:08Z

    On 04/13/2017 03:28 PM, Tom Lane wrote:
    > Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
    >> On 04/12/2017 03:36 PM, David Rowley wrote:
    >>> "stakind" seems like a better name. I'd have personally gone with
    >>> "statype" but pg_statistic already thinks stakind is better.
    >
    >> +1 to stakind
    >
    > I agree with that, but as long as we're rethinking column names here,
    > was it a good idea to use the same "sta" prefix in pg_statistic_ext
    > as in pg_statistic?  I do not think there's anyplace else where we're
    > using the same table-identifying prefix in two different catalogs,
    > and it seems a little pointless to follow that convention at all if
    > we're not going to make it a unique prefix.
    >
    > We could go with "ste" perhaps, or break the convention of 3-character
    > prefixes and go with "stae".
    
    We have a bunch of > 3-character prefixes already: amop*, amproc*, 
    enum*, cast*. But I think I nevertheless like "ste" better.
    
    That said, we also have two existing tables with the same prefix: 
    pg_constraint and pg_conversion. Both use "con" as the prefix. Yes, it 
    is a bit confusing, let's not to make the same mistake again.
    
    - Heikki
    
    
    
    
  6. Re: pg_statistic_ext.staenabled might not be the best column name

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2017-04-13T16:00:12Z

    On 4/13/17 08:37, Heikki Linnakangas wrote:
    >> We could go with "ste" perhaps, or break the convention of 3-character
    >> prefixes and go with "stae".
    > We have a bunch of > 3-character prefixes already: amop*, amproc*, 
    > enum*, cast*. But I think I nevertheless like "ste" better.
    
    "stx" perhaps?
    
    I would also be in favor of changing it to something other than "sta".
    
    -- 
    Peter Eisentraut              http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
  7. Re: pg_statistic_ext.staenabled might not be the best column name

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-04-13T16:17:37Z

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
    > On 4/13/17 08:37, Heikki Linnakangas wrote:
    >> We have a bunch of > 3-character prefixes already: amop*, amproc*, 
    >> enum*, cast*. But I think I nevertheless like "ste" better.
    
    > "stx" perhaps?
    
    > I would also be in favor of changing it to something other than "sta".
    
    "stx" sounds pretty good to me --- it seems like e.g. "stxkind" is
    more visibly distinct from "stakind" than "stekind" would be.
    
    Any objections out there?
    
    			regards, tom lane
    
    
    
  8. Re: pg_statistic_ext.staenabled might not be the best column name

    Alvaro Herrera <alvherre@2ndquadrant.com> — 2017-04-13T16:31:26Z

    Tom Lane wrote:
    > Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
    > > On 4/13/17 08:37, Heikki Linnakangas wrote:
    > >> We have a bunch of > 3-character prefixes already: amop*, amproc*, 
    > >> enum*, cast*. But I think I nevertheless like "ste" better.
    > 
    > > "stx" perhaps?
    > 
    > > I would also be in favor of changing it to something other than "sta".
    > 
    > "stx" sounds pretty good to me --- it seems like e.g. "stxkind" is
    > more visibly distinct from "stakind" than "stekind" would be.
    > 
    > Any objections out there?
    
    stx sounds good to me too.  I'll see about a patch this afternoon.
    
    -- 
    Álvaro Herrera                https://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
  9. Re: pg_statistic_ext.staenabled might not be the best column name

    Alvaro Herrera <alvherre@2ndquadrant.com> — 2017-04-17T21:38:16Z

    Alvaro Herrera wrote:
    > Tom Lane wrote:
    > > Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
    > > > On 4/13/17 08:37, Heikki Linnakangas wrote:
    > > >> We have a bunch of > 3-character prefixes already: amop*, amproc*, 
    > > >> enum*, cast*. But I think I nevertheless like "ste" better.
    > > 
    > > > "stx" perhaps?
    > > 
    > > > I would also be in favor of changing it to something other than "sta".
    > > 
    > > "stx" sounds pretty good to me --- it seems like e.g. "stxkind" is
    > > more visibly distinct from "stakind" than "stekind" would be.
    > > 
    > > Any objections out there?
    > 
    > stx sounds good to me too.  I'll see about a patch this afternoon.
    
    Took me a bit longer than I had hoped, but it's done now.
    
    -- 
    Álvaro Herrera                https://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services