Skip to content
Snippets Groups Projects
  1. Jan 26, 2011
  2. Jan 25, 2011
    • Robert Haas's avatar
      Fix thinko in ALTER FOREIGN TABLE documentation. · 558d1c95
      Robert Haas authored
      Noah Misch
      558d1c95
    • Tom Lane's avatar
      Replace pg_class.relhasexclusion with pg_index.indisexclusion. · bd1ad1b0
      Tom Lane authored
      There isn't any need to track this state on a table-wide basis, and trying
      to do so introduces undesirable semantic fuzziness.  Move the flag to
      pg_index, where it clearly describes just a single index and can be
      immutable after index creation.
      bd1ad1b0
    • Tom Lane's avatar
      Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX. · 88452d5b
      Tom Lane authored
      This feature allows a unique or pkey constraint to be created using an
      already-existing unique index.  While the constraint isn't very
      functionally different from the bare index, it's nice to be able to do that
      for documentation purposes.  The main advantage over just issuing a plain
      ALTER TABLE ADD UNIQUE/PRIMARY KEY is that the index can be created with
      CREATE INDEX CONCURRENTLY, so that there is not a long interval where the
      table is locked against updates.
      
      On the way, refactor some of the code in DefineIndex() and index_create()
      so that we don't have to pass through those functions in order to create
      the index constraint's catalog entries.  Also, in parse_utilcmd.c, pass
      around the ParseState pointer in struct CreateStmtContext to save on
      notation, and add error location pointers to some error reports that didn't
      have one before.
      
      Gurjeet Singh, reviewed by Steve Singer and Tom Lane
      88452d5b
  3. Jan 24, 2011
  4. Jan 23, 2011
  5. Jan 22, 2011
  6. Jan 21, 2011
  7. Jan 20, 2011
  8. Jan 19, 2011
  9. Jan 18, 2011
  10. Jan 14, 2011
    • Magnus Hagander's avatar
      Use a lexer and grammar for parsing walsender commands · fcd810c6
      Magnus Hagander authored
      Makes it easier to parse mainly the BASE_BACKUP command
      with it's options, and avoids having to manually deal
      with quoted identifiers in the label (previously broken),
      and makes it easier to add new commands and options in
      the future.
      
      In passing, refactor the case statement in the walsender
      to put each command in it's own function.
      fcd810c6
    • Tom Lane's avatar
      Code review for postmaster.pid contents changes. · 52948169
      Tom Lane authored
      Fix broken test for pre-existing postmaster, caused by wrong code for
      appending lines to the lockfile; don't write a failed listen_address
      setting into the lockfile; don't arbitrarily change the location of the
      data directory in the lockfile compared to previous releases; provide more
      consistent and useful definitions of the socket path and listen_address
      entries; avoid assuming that pg_ctl has the same DEFAULT_PGSOCKET_DIR as
      the postmaster; assorted code style improvements.
      52948169
  11. Jan 13, 2011
  12. Jan 12, 2011
  13. Jan 11, 2011
  14. Jan 10, 2011
    • Magnus Hagander's avatar
      Backend support for streaming base backups · 0eb59c45
      Magnus Hagander authored
      Add BASE_BACKUP command to walsender, allowing it to stream a
      base backup to the client (in tar format). The syntax is still
      far from ideal, that will be fixed in the switch to use a proper
      grammar for walsender.
      
      No client included yet, will come as a separate commit.
      
      Magnus Hagander and Heikki Linnakangas
      0eb59c45
  15. Jan 09, 2011
    • Tom Lane's avatar
      Fix assorted corner-case bugs in contrib/intarray. · fdf2dbda
      Tom Lane authored
      The array containment operators now behave per mathematical expectation
      for empty arrays (ie, an empty array is contained in anything).
      Both these operators and the query_int operators now work as expected in
      GiST and GIN index searches, rather than having corner cases where the
      index searches gave different answers.
      
      Also, fix unexpected failures where the operators would claim that an array
      contained nulls, when in fact there was no longer any null present (similar
      to bug #5784).  The restriction to not have nulls is still there, as
      removing it would take a lot of added code complexity and probably slow
      things down significantly.
      
      Also, remove the arbitrary restriction to 1-D arrays; unlike the other
      restriction, this was buying us nothing performance-wise.
      
      Assorted cosmetic improvements and marginal performance improvements, too.
      fdf2dbda
  16. Jan 08, 2011
    • Tom Lane's avatar
      Remove pg_am.amindexnulls. · 7e2f9062
      Tom Lane authored
      The only use we have had for amindexnulls is in determining whether an
      index is safe to cluster on; but since the addition of the amclusterable
      flag, that usage is pretty redundant.
      
      In passing, clean up assorted sloppiness from the last patch that touched
      pg_am.h: Natts_pg_am was wrong, and ambuildempty was not documented.
      7e2f9062
    • Robert Haas's avatar
      Remove bogus claims regarding createuser defaults. · af84bee4
      Robert Haas authored
      Josh Kupershmidt
      af84bee4
    • Tom Lane's avatar
      Fix GIN to support null keys, empty and null items, and full index scans. · 73912e7f
      Tom Lane authored
      Per my recent proposal(s).  Null key datums can now be returned by
      extractValue and extractQuery functions, and will be stored in the index.
      Also, placeholder entries are made for indexable items that are NULL or
      contain no keys according to extractValue.  This means that the index is
      now always complete, having at least one entry for every indexed heap TID,
      and so we can get rid of the prohibition on full-index scans.  A full-index
      scan is implemented much the same way as partial-match scans were already:
      we build a bitmap representing all the TIDs found in the index, and then
      drive the results off that.
      
      Also, introduce a concept of a "search mode" that can be requested by
      extractQuery when the operator requires matching to empty items (this is
      just as cheap as matching to a single key) or requires a full index scan
      (which is not so cheap, but it sure beats failing or giving wrong answers).
      The behavior remains backward compatible for opclasses that don't return
      any null keys or request a non-default search mode.
      
      Using these features, we can now make the GIN index opclass for anyarray
      behave in a way that matches the actual anyarray operators for &&, <@, @>,
      and = ... which it failed to do before in assorted corner cases.
      
      This commit fixes the core GIN code and ginarrayprocs.c, updates the
      documentation, and adds some simple regression test cases for the new
      behaviors using the array operators.  The tsearch and contrib GIN opclass
      support functions still need to be looked over and probably fixed.
      
      Another thing I intend to fix separately is that this is pretty inefficient
      for cases where more than one scan condition needs a full-index search:
      we'll run duplicate GinScanEntrys, each one of which builds a large bitmap.
      There is some existing logic to merge duplicate GinScanEntrys but it needs
      refactoring to make it work for entries belonging to different scan keys.
      
      Note that most of gin.h has been split out into a new file gin_private.h,
      so that gin.h doesn't export anything that's not supposed to be used by GIN
      opclasses or the rest of the backend.  I did quite a bit of other code
      beautification work as well, mostly fixing comments and choosing more
      appropriate names for things.
      73912e7f
  17. Jan 07, 2011
  18. Jan 06, 2011
  19. Jan 05, 2011
    • Magnus Hagander's avatar
      Give superusers REPLIACTION permission by default · 66a8a042
      Magnus Hagander authored
      This can be overriden by using NOREPLICATION on the CREATE ROLE
      statement, but by default they will have it, making it backwards
      compatible and "less surprising" (given that superusers normally
      override all checks).
      66a8a042
Loading