Skip to content
Snippets Groups Projects
  1. Feb 07, 2016
    • Tom Lane's avatar
      Improve documentation about PRIMARY KEY constraints. · ddcc256c
      Tom Lane authored
      Get rid of the false implication that PRIMARY KEY is exactly equivalent to
      UNIQUE + NOT NULL.  That was more-or-less true at one time in our
      implementation, but the standard doesn't say that, and we've grown various
      features (many of them required by spec) that treat a pkey differently from
      less-formal constraints.  Per recent discussion on pgsql-general.
      
      I failed to resist the temptation to do some other wordsmithing in the
      same area.
      ddcc256c
  2. Oct 05, 2015
    • Andres Freund's avatar
      Remove outdated comment about relation level autovacuum freeze limits. · 6cb5bdec
      Andres Freund authored
      The documentation for the autovacuum_multixact_freeze_max_age and
      autovacuum_freeze_max_age relation level parameters contained:
      "Note that while you can set autovacuum_multixact_freeze_max_age very
      small, or even zero, this is usually unwise since it will force frequent
      vacuuming."
      which hasn't been true since these options were made relation options,
      instead of residing in the pg_autovacuum table (834a6da4).
      
      Remove the outdated sentence. Even the lowered limits from 2596d705 are
      high enough that this doesn't warrant calling out the risk in the CREATE
      TABLE docs.
      
      Per discussion with Tom Lane and Alvaro Herrera
      
      Discussion: 26377.1443105453@sss.pgh.pa.us
      Backpatch: 9.0- (in parts)
      6cb5bdec
  3. Jul 24, 2012
    • Alvaro Herrera's avatar
      Change syntax of new CHECK NO INHERIT constraints · 68043258
      Alvaro Herrera authored
      The initially implemented syntax, "CHECK NO INHERIT (expr)" was not
      deemed very good, so switch to "CHECK (expr) NO INHERIT" instead.  This
      way it looks similar to SQL-standards compliant constraint attribute.
      
      Backport to 9.2 where the new syntax and feature was introduced.
      
      Per discussion.
      68043258
  4. Jun 22, 2012
  5. Jun 14, 2012
  6. Jun 13, 2012
    • Tom Lane's avatar
      Deprecate use of GLOBAL and LOCAL in temp table creation. · c3bc76bd
      Tom Lane authored
      Aside from adjusting the documentation to say that these are deprecated,
      we now report a warning (not an error) for use of GLOBAL, since it seems
      fairly likely that we might change that to request SQL-spec-compliant temp
      table behavior in the foreseeable future.  Although our handling of LOCAL
      is equally nonstandard, there is no evident interest in ever implementing
      SQL modules, and furthermore some other products interpret LOCAL as
      behaving the same way we do.  So no expectation of change and no warning
      for LOCAL; but it still seems a good idea to deprecate writing it.
      
      Noah Misch
      c3bc76bd
  7. Apr 24, 2012
  8. Apr 21, 2012
    • Alvaro Herrera's avatar
      Recast "ONLY" column CHECK constraints as NO INHERIT · 09ff76fc
      Alvaro Herrera authored
      The original syntax wasn't universally loved, and it didn't allow its
      usage in CREATE TABLE, only ALTER TABLE.  It now works everywhere, and
      it also allows using ALTER TABLE ONLY to add an uninherited CHECK
      constraint, per discussion.
      
      The pg_constraint column has accordingly been renamed connoinherit.
      
      This commit partly reverts some of the changes in
      61d81bd2, particularly some pg_dump and
      psql bits, because now pg_get_constraintdef includes the necessary NO
      INHERIT within the constraint definition.
      
      Author: Nikhil Sontakke
      Some tweaks by me
      09ff76fc
  9. Mar 03, 2012
  10. Jan 10, 2012
  11. Jan 07, 2012
    • Peter Eisentraut's avatar
      Rename the internal structures of the CREATE TABLE (LIKE ...) facility · db49517c
      Peter Eisentraut authored
      The original implementation of this interpreted it as a kind of
      "inheritance" facility and named all the internal structures
      accordingly.  This turned out to be very confusing, because it has
      nothing to do with the INHERITS feature.  So rename all the internal
      parser infrastructure, update the comments, adjust the error messages,
      and split up the regression tests.
      db49517c
  12. Dec 19, 2011
    • Peter Eisentraut's avatar
      Add support for privileges on types · 72920557
      Peter Eisentraut authored
      This adds support for the more or less SQL-conforming USAGE privilege
      on types and domains.  The intent is to be able restrict which users
      can create dependencies on types, which restricts the way in which
      owners can alter types.
      
      reviewed by Yeb Havinga
      72920557
  13. Dec 17, 2011
    • Tom Lane's avatar
      Add SP-GiST (space-partitioned GiST) index access method. · 8daeb5dd
      Tom Lane authored
      SP-GiST is comparable to GiST in flexibility, but supports non-balanced
      partitioned search structures rather than balanced trees.  As described at
      PGCon 2011, this new indexing structure can beat GiST in both index build
      time and query speed for search problems that it is well matched to.
      
      There are a number of areas that could still use improvement, but at this
      point the code seems committable.
      
      Teodor Sigaev and Oleg Bartunov, with considerable revisions by Tom Lane
      8daeb5dd
  14. Aug 07, 2011
    • Peter Eisentraut's avatar
      Fix a whitespace issue with the man pages · 6ef24487
      Peter Eisentraut authored
      There is what may actually be a mistake in our markup.  The problem is
      in a situation like
      
      <para>
       <command>FOO</command> is ...
      
      there is strictly speaking a line break before "FOO".  In the HTML
      output, this does not appear to be a problem, but in the man page
      output, this shows up, so you get double blank lines at odd places.
      
      So far, we have attempted to work around this with an XSL hack, but
      that causes other problems, such as creating run-ins in places like
      
      <acronym>SQL</acronym> <command>COPY</command>
      
      So fix the problem properly by removing the extra whitespace.  I only
      fixed the problems that affect the man page output, not all the
      places.
      6ef24487
  15. Mar 10, 2011
    • Tom Lane's avatar
      Remove collation information from TypeName, where it does not belong. · a051ef69
      Tom Lane authored
      The initial collations patch treated a COLLATE spec as part of a TypeName,
      following what can only be described as brain fade on the part of the SQL
      committee.  It's a lot more reasonable to treat COLLATE as a syntactically
      separate object, so that it can be added in only the productions where it
      actually belongs, rather than needing to reject it in a boatload of places
      where it doesn't belong (something the original patch mostly failed to do).
      In addition this change lets us meet the spec's requirement to allow
      COLLATE anywhere in the clauses of a ColumnDef, and it avoids unfriendly
      behavior for constructs such as "foo::type COLLATE collation".
      
      To do this, pull collation information out of TypeName and put it in
      ColumnDef instead, thus reverting most of the collation-related changes in
      parse_type.c's API.  I made one additional structural change, which was to
      use a ColumnDef as an intermediate node in AT_AlterColumnType AlterTableCmd
      nodes.  This provides enough room to get rid of the "transform" wart in
      AlterTableCmd too, since the ColumnDef can carry the USING expression
      easily enough.
      
      Also fix some other minor bugs that have crept in in the same areas,
      like failure to copy recently-added fields of ColumnDef in copyfuncs.c.
      
      While at it, document the formerly secret ability to specify a collation
      in ALTER TABLE ALTER COLUMN TYPE, ALTER TYPE ADD ATTRIBUTE, and
      ALTER TYPE ALTER ATTRIBUTE TYPE; and correct some misstatements about
      what the default collation selection will be when COLLATE is omitted.
      
      BTW, the three-parameter form of format_type() should go away too,
      since it just contributes to the confusion in this area; but I'll do
      that in a separate patch.
      a051ef69
  16. Feb 08, 2011
    • Peter Eisentraut's avatar
      Per-column collation support · 414c5a2e
      Peter Eisentraut authored
      This adds collation support for columns and domains, a COLLATE clause
      to override it per expression, and B-tree index support.
      
      Peter Eisentraut
      reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
      414c5a2e
  17. Feb 01, 2011
  18. Jan 29, 2011
  19. Jan 02, 2011
    • Robert Haas's avatar
      Basic foreign table support. · 0d692a0d
      Robert Haas authored
      Foreign tables are a core component of SQL/MED.  This commit does
      not provide a working SQL/MED infrastructure, because foreign tables
      cannot yet be queried.  Support for foreign table scans will need to
      be added in a future patch.  However, this patch creates the necessary
      system catalog structure, syntax support, and support for ancillary
      operations such as COMMENT and SECURITY LABEL.
      
      Shigeru Hanada, heavily revised by Robert Haas
      0d692a0d
  20. Dec 29, 2010
    • Robert Haas's avatar
      Support unlogged tables. · 53dbc27c
      Robert Haas authored
      The contents of an unlogged table are WAL-logged; thus, they are not
      available on standby servers and are truncated whenever the database
      system enters recovery.  Indexes on unlogged tables are also unlogged.
      Unlogged GiST indexes are not currently supported.
      53dbc27c
    • Tom Lane's avatar
      Reclassify DEFAULT as a column_constraint item in the CREATE TABLE syntax. · 31d2efae
      Tom Lane authored
      This is how it was documented originally, but several years ago somebody
      decided that DEFAULT isn't a type of constraint.  Well, the grammar thinks
      it is.  The documentation was wrong in two ways: it alleged that DEFAULT
      had to appear before any other kind of constraint, and it alleged that you
      can't prefix a DEFAULT clause with a "CONSTRAINT name" clause, when in fact
      you can.  (The latter behavior probably isn't SQL-standard, but our grammar
      has always allowed it.)
      
      This patch responds to Fujii Masao's observation that the ALTER TABLE
      documentation mistakenly implied that you couldn't include DEFAULT in
      ALTER TABLE ADD COLUMN; though this isn't the way he proposed fixing it.
      31d2efae
  21. Sep 20, 2010
  22. Aug 17, 2010
  23. Jul 26, 2010
  24. Jun 07, 2010
    • Itagaki Takahiro's avatar
      Ensure default-only storage parameters for TOAST relations · b5faba12
      Itagaki Takahiro authored
      to be initialized with proper values. Affected parameters are
      fillfactor, analyze_threshold, and analyze_scale_factor.
      
      Especially uninitialized fillfactor caused inefficient page usage
      because we built a StdRdOptions struct in which fillfactor is zero
      if any reloption is set for the toast table.
      
      In addition, we disallow toast.autovacuum_analyze_threshold and
      toast.autovacuum_analyze_scale_factor because we didn't actually
      support them; they are always ignored.
      
      Report by Rumko on pgsql-bugs on 12 May 2010.
      Analysis by Tom Lane and Alvaro Herrera. Patch by me.
      
      Backpatch to 8.4.
      b5faba12
  25. May 13, 2010
  26. Apr 16, 2010
  27. Apr 03, 2010
    • Peter Eisentraut's avatar
      Remove unnecessary xref endterm attributes and title ids · 6dcce398
      Peter Eisentraut authored
      The endterm attribute is mainly useful when the toolchain does not support
      automatic link target text generation for a particular situation.  In  the
      past, this was required by the man page tools for all reference page links,
      but that is no longer the case, and it now actually gets in the way of
      proper automatic link text generation.  The only remaining use cases are
      currently xrefs to refsects.
      6dcce398
  28. Apr 01, 2010
  29. Feb 27, 2010
  30. Feb 23, 2010
  31. Jan 29, 2010
  32. Dec 07, 2009
  33. Oct 27, 2009
  34. Oct 13, 2009
  35. Oct 12, 2009
  36. Sep 18, 2009
    • Peter Eisentraut's avatar
      Easier to translate psql help · 20f7f019
      Peter Eisentraut authored
      Instead of requiring translators to translate the entire SQL command
      synopses, change create_help.pl to only require them to translate the
      placeholders, and paste those into the synopsis using a printf mechanism.
      Make some small updates to the markup to make it easier to parse.
      
      Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
      the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
      msgmerge usually only runs on babel.postgresql.org, however.
      20f7f019
  37. Jul 29, 2009
    • Tom Lane's avatar
      Support deferrable uniqueness constraints. · 25d9bf2e
      Tom Lane authored
      The current implementation fires an AFTER ROW trigger for each tuple that
      looks like it might be non-unique according to the index contents at the
      time of insertion.  This works well as long as there aren't many conflicts,
      but won't scale to massive unique-key reassignments.  Improving that case
      is a TODO item.
      
      Dean Rasheed
      25d9bf2e
  38. Feb 12, 2009
Loading