1. 22 Oct, 2018 1 commit
    • Michael Paquier's avatar
      Set pg_class.relhassubclass for partitioned indexes · 17f206fb
      Michael Paquier authored
      Like for relations, switching this parameter is optimistic by turning it
      on each time a partitioned index gains a partition.  So seeing this
      parameter set to true means that the partitioned index has or has had
      partitions.  The flag cannot be reset yet for partitioned indexes, which
      is something not obvious anyway as partitioned relations exist to have
      partitions.
      
      This allows to track more conveniently partition trees for indexes,
      which will come in use with an upcoming patch helping in listing
      partition trees with an SQL-callable function.
      
      Author: Amit Langote
      Reviewed-by: Michael Paquier
      Discussion: https://postgr.es/m/80306490-b5fc-ea34-4427-f29c52156052@lab.ntt.co.jp
      17f206fb
  2. 16 Oct, 2018 1 commit
    • Andres Freund's avatar
      Correct constness of system attributes in heap.c & prerequisites. · 02a30a09
      Andres Freund authored
      This allows the compiler / linker to mark affected pages as read-only.
      
      There's a fair number of pre-requisite changes, to allow the const
      properly be propagated. Most of consts were already required for
      correctness anyway, just not represented on the type-level.  Arguably
      we could be more aggressive in using consts in related code, but..
      
      This requires using a few of the types underlying typedefs that
      removes pointers (e.g. const NameData *) as declaring the typedefed
      type constant doesn't have the same meaning (it makes the variable
      const, not what it points to).
      
      Discussion: https://postgr.es/m/20181015200754.7y7zfuzsoux2c4ya@alap3.anarazel.de
      02a30a09
  3. 06 Oct, 2018 1 commit
    • Alvaro Herrera's avatar
      Fix event triggers for partitioned tables · ad08006b
      Alvaro Herrera authored
      Index DDL cascading on partitioned tables introduced a way for ALTER
      TABLE to be called reentrantly.  This caused an an important deficiency
      in event trigger support to be exposed: on exiting the reentrant call,
      the alter table state object was clobbered, causing a crash when the
      outer alter table tries to finalize its processing.  Fix the crash by
      creating a stack of event trigger state objects.  There are still ways
      to cause things to misbehave (and probably other crashers) with more
      elaborate tricks, but at least it now doesn't crash in the obvious
      scenario.
      
      Backpatch to 9.5, where DDL deparsing of event triggers was introduced.
      
      Reported-by: Marco Slot
      Authors: Michaël Paquier, Álvaro Herrera
      Discussion: https://postgr.es/m/CANNhMLCpi+HQ7M36uPfGbJZEQLyTy7XvX=5EFkpR-b1bo0uJew@mail.gmail.com
      ad08006b
  4. 04 Oct, 2018 1 commit
  5. 25 Sep, 2018 1 commit
    • Andres Freund's avatar
      Split ExecStoreTuple into ExecStoreHeapTuple and ExecStoreBufferHeapTuple. · 29c94e03
      Andres Freund authored
      Upcoming changes introduce further types of tuple table slots, in
      preparation of making table storage pluggable. New storage methods
      will have different representation of tuples, therefore the slot
      accessor should refer explicitly to heap tuples.
      
      Instead of just renaming the functions, split it into one function
      that accepts heap tuples not residing in buffers, and one accepting
      ones in buffers.  Previously one function was used for both, but that
      was a bit awkward already, and splitting will allow us to represent
      slot types for tuples in buffers and normal memory separately.
      
      This is split out from the patch introducing abstract slots, as this
      largely consists out of mechanical changes.
      
      Author: Ashutosh Bapat
      Reviewed-By: Andres Freund
      Discussion: https://postgr.es/m/20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de
      29c94e03
  6. 13 Sep, 2018 1 commit
    • Peter Eisentraut's avatar
      Simplify index tuple descriptor initialization · e5f1bb92
      Peter Eisentraut authored
      We have two code paths for initializing the tuple descriptor for a new
      index: For a normal index, we copy the tuple descriptor from the table
      and reset a number of fields that are not applicable to indexes.  For an
      expression index, we make a blank tuple descriptor and fill in the
      needed fields based on the provided expressions.  As pg_attribute has
      grown over time, the number of fields that we need to reset in the first
      case is now bigger than the number of fields we actually want to copy,
      so it's sensible to do it the other way around: Make a blank descriptor
      and copy just the fields we need.  This also allows more code sharing
      between the two branches, and it avoids having to touch this code for
      almost every unrelated change to the pg_attribute structure.
      Reviewed-by: default avatarArthur Zakirov <a.zakirov@postgrespro.ru>
      e5f1bb92
  7. 04 Sep, 2018 1 commit
    • Tom Lane's avatar
      Fully enforce uniqueness of constraint names. · 17b7c302
      Tom Lane authored
      It's been true for a long time that we expect names of table and domain
      constraints to be unique among the constraints of that table or domain.
      However, the enforcement of that has been pretty haphazard, and it missed
      some corner cases such as creating a CHECK constraint and then an index
      constraint of the same name (as per recent report from André Hänsel).
      Also, due to the lack of an actual unique index enforcing this, duplicates
      could be created through race conditions.
      
      Moreover, the code that searches pg_constraint has been quite inconsistent
      about how to handle duplicate names if one did occur: some places checked
      and threw errors if there was more than one match, while others just
      processed the first match they came to.
      
      To fix, create a unique index on (conrelid, contypid, conname).  Since
      either conrelid or contypid is zero, this will separately enforce
      uniqueness of constraint names among constraints of any one table and any
      one domain.  (If we ever implement SQL assertions, and put them into this
      catalog, more thought might be needed.  But it'd be at least as reasonable
      to put them into a new catalog; having overloaded this one catalog with
      two kinds of constraints was a mistake already IMO.)  This index can replace
      the existing non-unique index on conrelid, though we need to keep the one
      on contypid for query performance reasons.
      
      Having done that, we can simplify the logic in various places that either
      coped with duplicates or neglected to, as well as potentially improve
      lookup performance when searching for a constraint by name.
      
      Also, as per our usual practice, install a preliminary check so that you
      get something more friendly than a unique-index violation report in the
      case complained of by André.  And teach ChooseIndexName to avoid choosing
      autogenerated names that would draw such a failure.
      
      While it's not possible to make such a change in the back branches,
      it doesn't seem quite too late to put this into v11, so do so.
      
      Discussion: https://postgr.es/m/0c1001d4428f$0942b430$1bc81c90$@webkr.de
      17b7c302
  8. 17 Aug, 2018 1 commit
  9. 03 Aug, 2018 1 commit
    • Peter Geoghegan's avatar
      Add table relcache invalidation to index builds. · b3f919da
      Peter Geoghegan authored
      It's necessary to make sure that owning tables have a relcache
      invalidation prior to advancing the command counter to make
      newly-entered catalog tuples for the index visible.  inval.c must be
      able to maintain the consistency of the local caches in the event of
      transaction abort.  There is usually only a problem when CREATE INDEX
      transactions abort, since there is a generic invalidation once we reach
      index_update_stats().
      
      This bug is of long standing.  Problems were made much more likely by
      the addition of parallel CREATE INDEX (commit 9da0cc35), but it is
      strongly suspected that similar problems can be triggered without
      involving plan_create_index_workers().  (plan_create_index_workers()
      triggers a relcache build or rebuild, which previously only happened in
      rare edge cases.)
      
      Author: Peter Geoghegan
      Reported-By: Luca Ferrari
      Diagnosed-By: Andres Freund
      Reviewed-By: Andres Freund
      Discussion: https://postgr.es/m/CAKoxK+5fVodiCtMsXKV_1YAKXbzwSfp7DgDqUmcUAzeAhf=HEQ@mail.gmail.com
      Backpatch: 9.3-
      b3f919da
  10. 08 May, 2018 1 commit
    • Tom Lane's avatar
      Count heap tuples in non-SnapshotAny path in IndexBuildHeapRangeScan(). · 3a675f72
      Tom Lane authored
      Brown-paper-bag bug in commit 7c91a036: when we rearranged the placement
      of "reltuples += 1" statements, we missed including one in this code path.
      
      The net effect of that was that CREATE INDEX CONCURRENTLY would set the
      table's pg_class.reltuples to zero, as would index builds done during
      bootstrap mode.  (It seems like parallel index builds ought to fail
      similarly, but they don't, perhaps because reltuples is computed in some
      other way.  You certainly couldn't figure that out from the abysmally
      underdocumented parallelism code in this area.)
      
      I was led to this by wondering why initdb seemed to have slowed down as
      a result of 7c91a036, as is evident in the buildfarm's timing history.
      The reason is that every system catalog with indexes had pg_class.reltuples
      = 0 after bootstrap, causing the planner to make some terrible choices for
      queries in the post-bootstrap steps.  On my workstation, this fix causes
      the runtime of "initdb -N" to drop from ~2.0 sec to ~1.4 sec, which is
      almost though not quite back to where it was in v10.  That's not much of
      a deal for production use perhaps, but it makes a noticeable difference
      for buildfarm and "make check-world" runs, which do a lot of initdbs.
      3a675f72
  11. 26 Apr, 2018 1 commit
  12. 12 Apr, 2018 3 commits
  13. 08 Apr, 2018 1 commit
    • Tom Lane's avatar
      Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. · cefa3871
      Tom Lane authored
      Traditionally, include/catalog/pg_foo.h contains extern declarations
      for functions in backend/catalog/pg_foo.c, in addition to its function
      as the authoritative definition of the pg_foo catalog's rowtype.
      In some cases, we'd been forced to split out those extern declarations
      into separate pg_foo_fn.h headers so that the catalog definitions
      could be #include'd by frontend code.  That problem is gone as of
      commit 9c0a0de4, so let's undo the splits to make things less
      confusing.
      
      Discussion: https://postgr.es/m/23690.1523031777@sss.pgh.pa.us
      cefa3871
  14. 07 Apr, 2018 1 commit
    • Teodor Sigaev's avatar
      Indexes with INCLUDE columns and their support in B-tree · 8224de4f
      Teodor Sigaev authored
      This patch introduces INCLUDE clause to index definition.  This clause
      specifies a list of columns which will be included as a non-key part in
      the index.  The INCLUDE columns exist solely to allow more queries to
      benefit from index-only scans.  Also, such columns don't need to have
      appropriate operator classes.  Expressions are not supported as INCLUDE
      columns since they cannot be used in index-only scans.
      
      Index access methods supporting INCLUDE are indicated by amcaninclude flag
      in IndexAmRoutine.  For now, only B-tree indexes support INCLUDE clause.
      
      In B-tree indexes INCLUDE columns are truncated from pivot index tuples
      (tuples located in non-leaf pages and high keys).  Therefore, B-tree indexes
      now might have variable number of attributes.  This patch also provides
      generic facility to support that: pivot tuples contain number of their
      attributes in t_tid.ip_posid.  Free 13th bit of t_info is used for indicating
      that.  This facility will simplify further support of index suffix truncation.
      The changes of above are backward-compatible, pg_upgrade doesn't need special
      handling of B-tree indexes for that.
      
      Bump catalog version
      
      Author: Anastasia Lubennikova with contribition by Alexander Korotkov and me
      Reviewed by: Peter Geoghegan, Tomas Vondra, Antonin Houska, Jeff Janes,
      			 David Rowley, Alexander Korotkov
      Discussion: https://www.postgresql.org/message-id/flat/56168952.4010101@postgrespro.ru
      8224de4f
  15. 06 Apr, 2018 1 commit
  16. 28 Mar, 2018 1 commit
    • Andrew Dunstan's avatar
      Fast ALTER TABLE ADD COLUMN with a non-NULL default · 16828d5c
      Andrew Dunstan authored
      Currently adding a column to a table with a non-NULL default results in
      a rewrite of the table. For large tables this can be both expensive and
      disruptive. This patch removes the need for the rewrite as long as the
      default value is not volatile. The default expression is evaluated at
      the time of the ALTER TABLE and the result stored in a new column
      (attmissingval) in pg_attribute, and a new column (atthasmissing) is set
      to true. Any existing row when fetched will be supplied with the
      attmissingval. New rows will have the supplied value or the default and
      so will never need the attmissingval.
      
      Any time the table is rewritten all the atthasmissing and attmissingval
      settings for the attributes are cleared, as they are no longer needed.
      
      The most visible code change from this is in heap_attisnull, which
      acquires a third TupleDesc argument, allowing it to detect a missing
      value if there is one. In many cases where it is known that there will
      not be any (e.g.  catalog relations) NULL can be passed for this
      argument.
      
      Andrew Dunstan, heavily modified from an original patch from Serge
      Rielau.
      Reviewed by Tom Lane, Andres Freund, Tomas Vondra and David Rowley.
      
      Discussion: https://postgr.es/m/31e2e921-7002-4c27-59f5-51f08404c858@2ndQuadrant.com
      16828d5c
  17. 27 Mar, 2018 1 commit
    • Simon Riggs's avatar
      Allow HOT updates for some expression indexes · c203d6cf
      Simon Riggs authored
      If the value of an index expression is unchanged after UPDATE,
      allow HOT updates where previously we disallowed them, giving
      a significant performance boost in those cases.
      
      Particularly useful for indexes such as JSON->>field where the
      JSON value changes but the indexed value does not.
      
      Submitted as "surjective indexes" patch, now enabled by use
      of new "recheck_on_update" parameter.
      
      Author: Konstantin Knizhnik
      Reviewer: Simon Riggs, with much wordsmithing and some cleanup
      c203d6cf
  18. 23 Mar, 2018 1 commit
    • Alvaro Herrera's avatar
      Allow FOR EACH ROW triggers on partitioned tables · 86f57594
      Alvaro Herrera authored
      Previously, FOR EACH ROW triggers were not allowed in partitioned
      tables.  Now we allow AFTER triggers on them, and on trigger creation we
      cascade to create an identical trigger in each partition.  We also clone
      the triggers to each partition that is created or attached later.
      
      This means that deferred unique keys are allowed on partitioned tables,
      too.
      
      Author: Álvaro Herrera
      Reviewed-by: Peter Eisentraut, Simon Riggs, Amit Langote, Robert Haas,
      	Thomas Munro
      Discussion: https://postgr.es/m/20171229225319.ajltgss2ojkfd3kp@alvherre.pgsql
      86f57594
  19. 22 Mar, 2018 1 commit
    • Tom Lane's avatar
      Sync up our various ways of estimating pg_class.reltuples. · 7c91a036
      Tom Lane authored
      VACUUM thought that reltuples represents the total number of tuples in
      the relation, while ANALYZE counted only live tuples.  This can cause
      "flapping" in the value when background vacuums and analyzes happen
      separately.  The planner's use of reltuples essentially assumes that
      it's the count of live (visible) tuples, so let's standardize on having
      it mean live tuples.
      
      Another issue is that the definition of "live tuple" isn't totally clear;
      what should be done with INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples?
      ANALYZE's choices in this regard are made on the assumption that if the
      originating transaction commits at all, it will happen after ANALYZE
      finishes, so we should ignore the effects of the in-progress transaction
      --- unless it is our own transaction, and then we should count it.
      Let's propagate this definition into VACUUM, too.
      
      Likewise propagate this definition into CREATE INDEX, and into
      contrib/pgstattuple's pgstattuple_approx() function.
      
      Tomas Vondra, reviewed by Haribabu Kommi, some corrections by me
      
      Discussion: https://postgr.es/m/16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com
      7c91a036
  20. 14 Mar, 2018 1 commit
  21. 01 Mar, 2018 1 commit
  22. 19 Feb, 2018 2 commits
  23. 02 Feb, 2018 1 commit
    • Robert Haas's avatar
      Support parallel btree index builds. · 9da0cc35
      Robert Haas authored
      To make this work, tuplesort.c and logtape.c must also support
      parallelism, so this patch adds that infrastructure and then applies
      it to the particular case of parallel btree index builds.  Testing
      to date shows that this can often be 2-3x faster than a serial
      index build.
      
      The model for deciding how many workers to use is fairly primitive
      at present, but it's better than not having the feature.  We can
      refine it as we get more experience.
      
      Peter Geoghegan with some help from Rushabh Lathia.  While Heikki
      Linnakangas is not an author of this patch, he wrote other patches
      without which this feature would not have been possible, and
      therefore the release notes should possibly credit him as an author
      of this feature.  Reviewed by Claudio Freire, Heikki Linnakangas,
      Thomas Munro, Tels, Amit Kapila, me.
      
      Discussion: http://postgr.es/m/CAM3SWZQKM=Pzc=CAHzRixKjp2eO5Q0Jg1SoFQqeXFQ647JiwqQ@mail.gmail.com
      Discussion: http://postgr.es/m/CAH2-Wz=AxWqDoVvGU7dq856S4r6sJAj6DBn7VMtigkB33N5eyg@mail.gmail.com
      9da0cc35
  24. 19 Jan, 2018 3 commits
    • Alvaro Herrera's avatar
      Fix CompareIndexInfo's attnum comparisons · 7f17fd6f
      Alvaro Herrera authored
      When an index column is an expression, it makes no sense to compare its
      attribute numbers.
      
      This seems to account for remaining buildfarm fallout from 8b08f7d4.
      At least, it solves the issue in my local 32bit VM -- let's see what the
      rest thinks.
      7f17fd6f
    • Alvaro Herrera's avatar
      Local partitioned indexes · 8b08f7d4
      Alvaro Herrera authored
      When CREATE INDEX is run on a partitioned table, create catalog entries
      for an index on the partitioned table (which is just a placeholder since
      the table proper has no data of its own), and recurse to create actual
      indexes on the existing partitions; create them in future partitions
      also.
      
      As a convenience gadget, if the new index definition matches some
      existing index in partitions, these are picked up and used instead of
      creating new ones.  Whichever way these indexes come about, they become
      attached to the index on the parent table and are dropped alongside it,
      and cannot be dropped on isolation unless they are detached first.
      
      To support pg_dump'ing these indexes, add commands
          CREATE INDEX ON ONLY <table>
      (which creates the index on the parent partitioned table, without
      recursing) and
          ALTER INDEX ATTACH PARTITION
      (which is used after the indexes have been created individually on each
      partition, to attach them to the parent index).  These reconstruct prior
      database state exactly.
      
      Reviewed-by: (in alphabetical order) Peter Eisentraut, Robert Haas, Amit
      	Langote, Jesper Pedersen, Simon Riggs, David Rowley
      Discussion: https://postgr.es/m/20171113170646.gzweigyrgg6pwsg4@alvherre.pgsql
      8b08f7d4
    • Robert Haas's avatar
      Transfer state pertaining to pending REINDEX operations to workers. · 29d58fd3
      Robert Haas authored
      This will allow the pending patch for parallel CREATE INDEX to work
      on system catalogs, and to provide the same level of protection
      against use of user indexes while they are being rebuilt that we
      have for non-parallel CREATE INDEX.
      
      Patch by me, reviewed by Peter Geoghegan.
      
      Discussion: http://postgr.es/m/CA+TgmoYN-YQU9JsGQcqFLovZ-C+Xgp1_xhJQad=cunGG-_p5gg@mail.gmail.com
      Discussion: http://postgr.es/m/CAH2-Wzkv4UNkXYhqQRqk-u9rS7h5c-4cCW+EqQ8K_WSeS43aZg@mail.gmail.com
      29d58fd3
  25. 03 Jan, 2018 1 commit
  26. 14 Nov, 2017 1 commit
    • Alvaro Herrera's avatar
      Simplify index_[constraint_]create API · a61f5ab9
      Alvaro Herrera authored
      Instead of passing large swaths of boolean arguments, define some flags
      that can be used in a bitmask.  This makes it easier not only to figure
      out what each call site is doing, but also to add some new flags.
      
      The flags are split in two -- one set for index_create directly and
      another for constraints.  index_create() itself receives both, and then
      passes down the latter to index_constraint_create(), which can also be
      called standalone.
      
      Discussion: https://postgr.es/m/20171023151251.j75uoe27gajdjmlm@alvherre.pgsql
      Reviewed-by: Simon Riggs
      a61f5ab9
  27. 20 Aug, 2017 1 commit
  28. 04 Aug, 2017 1 commit
    • Tom Lane's avatar
      Apply ALTER ... SET NOT NULL recursively in ALTER ... ADD PRIMARY KEY. · c30f1770
      Tom Lane authored
      If you do ALTER COLUMN SET NOT NULL against an inheritance parent table,
      it will recurse to mark all the child columns as NOT NULL as well.  This
      is necessary for consistency: if the column is labeled NOT NULL then
      reading it should never produce nulls.
      
      However, that didn't happen in the case where ALTER ... ADD PRIMARY KEY
      marks a target column NOT NULL that wasn't before.  That was questionable
      from the beginning, and now Tushar Ahuja points out that it can lead to
      dump/restore failures in some cases.  So let's make that case recurse too.
      
      Although this is meant to fix a bug, it's enough of a behavioral change
      that I'm pretty hesitant to back-patch, especially in view of the lack
      of similar field complaints.  It doesn't seem to be too late to put it
      into v10 though.
      
      Michael Paquier, editorialized on slightly by me
      
      Discussion: https://postgr.es/m/b8794d6a-38f0-9d7c-ad4b-e85adf860fc9@enterprisedb.com
      c30f1770
  29. 24 Jul, 2017 1 commit
  30. 21 Jun, 2017 3 commits
    • Tom Lane's avatar
      Phase 3 of pgindent updates. · 382ceffd
      Tom Lane authored
      Don't move parenthesized lines to the left, even if that means they
      flow past the right margin.
      
      By default, BSD indent lines up statement continuation lines that are
      within parentheses so that they start just to the right of the preceding
      left parenthesis.  However, traditionally, if that resulted in the
      continuation line extending to the right of the desired right margin,
      then indent would push it left just far enough to not overrun the margin,
      if it could do so without making the continuation line start to the left of
      the current statement indent.  That makes for a weird mix of indentations
      unless one has been completely rigid about never violating the 80-column
      limit.
      
      This behavior has been pretty universally panned by Postgres developers.
      Hence, disable it with indent's new -lpl switch, so that parenthesized
      lines are always lined up with the preceding left paren.
      
      This patch is much less interesting than the first round of indent
      changes, but also bulkier, so I thought it best to separate the effects.
      
      Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
      Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
      382ceffd
    • Tom Lane's avatar
      Phase 2 of pgindent updates. · c7b8998e
      Tom Lane authored
      Change pg_bsd_indent to follow upstream rules for placement of comments
      to the right of code, and remove pgindent hack that caused comments
      following #endif to not obey the general rule.
      
      Commit e3860ffa wasn't actually using
      the published version of pg_bsd_indent, but a hacked-up version that
      tried to minimize the amount of movement of comments to the right of
      code.  The situation of interest is where such a comment has to be
      moved to the right of its default placement at column 33 because there's
      code there.  BSD indent has always moved right in units of tab stops
      in such cases --- but in the previous incarnation, indent was working
      in 8-space tab stops, while now it knows we use 4-space tabs.  So the
      net result is that in about half the cases, such comments are placed
      one tab stop left of before.  This is better all around: it leaves
      more room on the line for comment text, and it means that in such
      cases the comment uniformly starts at the next 4-space tab stop after
      the code, rather than sometimes one and sometimes two tabs after.
      
      Also, ensure that comments following #endif are indented the same
      as comments following other preprocessor commands such as #else.
      That inconsistency turns out to have been self-inflicted damage
      from a poorly-thought-through post-indent "fixup" in pgindent.
      
      This patch is much less interesting than the first round of indent
      changes, but also bulkier, so I thought it best to separate the effects.
      
      Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
      Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
      c7b8998e
    • Tom Lane's avatar
      Initial pgindent run with pg_bsd_indent version 2.0. · e3860ffa
      Tom Lane authored
      The new indent version includes numerous fixes thanks to Piotr Stefaniak.
      The main changes visible in this commit are:
      
      * Nicer formatting of function-pointer declarations.
      * No longer unexpectedly removes spaces in expressions using casts,
        sizeof, or offsetof.
      * No longer wants to add a space in "struct structname *varname", as
        well as some similar cases for const- or volatile-qualified pointers.
      * Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely.
      * Fixes bug where comments following declarations were sometimes placed
        with no space separating them from the code.
      * Fixes some odd decisions for comments following case labels.
      * Fixes some cases where comments following code were indented to less
        than the expected column 33.
      
      On the less good side, it now tends to put more whitespace around typedef
      names that are not listed in typedefs.list.  This might encourage us to
      put more effort into typedef name collection; it's not really a bug in
      indent itself.
      
      There are more changes coming after this round, having to do with comment
      indentation and alignment of lines appearing within parentheses.  I wanted
      to limit the size of the diffs to something that could be reviewed without
      one's eyes completely glazing over, so it seemed better to split up the
      changes as much as practical.
      
      Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
      Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
      e3860ffa
  31. 13 Jun, 2017 1 commit
  32. 04 Jun, 2017 1 commit
  33. 06 Apr, 2017 1 commit
    • Peter Eisentraut's avatar
      Identity columns · 32173270
      Peter Eisentraut authored
      This is the SQL standard-conforming variant of PostgreSQL's serial
      columns.  It fixes a few usability issues that serial columns have:
      
      - CREATE TABLE / LIKE copies default but refers to same sequence
      - cannot add/drop serialness with ALTER TABLE
      - dropping default does not drop sequence
      - need to grant separate privileges to sequence
      - other slight weirdnesses because serial is some kind of special macro
      Reviewed-by: default avatarVitaly Burovoy <vitaly.burovoy@gmail.com>
      32173270