Skip to content
Snippets Groups Projects
  1. Mar 13, 2013
  2. Mar 12, 2013
    • Tom Lane's avatar
      Allow default expressions to be attached to columns of foreign tables. · a0c6dfee
      Tom Lane authored
      There's still some discussion about exactly how postgres_fdw ought to
      handle this case, but there seems no debate that we want to allow defaults
      to be used for inserts into foreign tables.  So remove the core-code
      restrictions that prevented it.
      
      While at it, get rid of the special grammar productions for CREATE FOREIGN
      TABLE, and instead add explicit FEATURE_NOT_SUPPORTED error checks for the
      disallowed cases.  This makes the grammar a shade smaller, and more
      importantly results in much more intelligible error messages for
      unsupported cases.  It's also one less thing to fix if we ever start
      supporting constraints on foreign tables.
      a0c6dfee
    • Alvaro Herrera's avatar
      Fix orthotypographical mistake · 1ba01193
      Alvaro Herrera authored
      Apparently I lost some of the edits I had done on this page for commit
      0ac5ad51.
      
      Per note from Etsuro Fujita, although I didn't use his patch.
      
      Make some of the wording in the affected section a bit more complete,
      too.
      1ba01193
  3. Mar 10, 2013
    • Andrew Dunstan's avatar
      JSON generation improvements. · 38fb4d97
      Andrew Dunstan authored
      This adds the following:
      
          json_agg(anyrecord) -> json
          to_json(any) -> json
          hstore_to_json(hstore) -> json (also used as a cast)
          hstore_to_json_loose(hstore) -> json
      
      The last provides heuristic treatment of numbers and booleans.
      
      Also, in json generation, if any non-builtin type has a cast to json,
      that function is used instead of the type's output function.
      
      Andrew Dunstan, reviewed by Steve Singer.
      
      Catalog version bumped.
      38fb4d97
    • Peter Eisentraut's avatar
      doc: Add note about checkpoint_warning vs checkpoint_timeout · dd28c410
      Peter Eisentraut authored
      suggested by Tianyin Xu
      dd28c410
    • Tom Lane's avatar
      Support writable foreign tables. · 21734d2f
      Tom Lane authored
      This patch adds the core-system infrastructure needed to support updates
      on foreign tables, and extends contrib/postgres_fdw to allow updates
      against remote Postgres servers.  There's still a great deal of room for
      improvement in optimization of remote updates, but at least there's basic
      functionality there now.
      
      KaiGai Kohei, reviewed by Alexander Korotkov and Laurenz Albe, and rather
      heavily revised by Tom Lane.
      21734d2f
  4. Mar 07, 2013
  5. Mar 06, 2013
  6. Mar 04, 2013
    • Peter Eisentraut's avatar
      psql: Let \l accept a pattern · 0ea1f6e9
      Peter Eisentraut authored
      reviewed by Satoshi Nagayasu
      0ea1f6e9
    • Kevin Grittner's avatar
      Add a materialized view relations. · 3bf3ab8c
      Kevin Grittner authored
      A materialized view has a rule just like a view and a heap and
      other physical properties like a table.  The rule is only used to
      populate the table, references in queries refer to the
      materialized data.
      
      This is a minimal implementation, but should still be useful in
      many cases.  Currently data is only populated "on demand" by the
      CREATE MATERIALIZED VIEW and REFRESH MATERIALIZED VIEW statements.
      It is expected that future releases will add incremental updates
      with various timings, and that a more refined concept of defining
      what is "fresh" data will be developed.  At some point it may even
      be possible to have queries use a materialized in place of
      references to underlying tables, but that requires the other
      above-mentioned features to be working first.
      
      Much of the documentation work by Robert Haas.
      Review by Noah Misch, Thom Brown, Robert Haas, Marko Tiikkaja
      Security review by KaiGai Kohei, with a decision on how best to
      implement sepgsql still pending.
      3bf3ab8c
  7. Mar 03, 2013
  8. Feb 27, 2013
    • Heikki Linnakangas's avatar
      Remove spurious "the", and add a missing one. · 7d6b8f71
      Heikki Linnakangas authored
      Thom Brown and me.
      7d6b8f71
    • Heikki Linnakangas's avatar
      Add support for piping COPY to/from an external program. · 3d009e45
      Heikki Linnakangas authored
      This includes backend "COPY TO/FROM PROGRAM '...'" syntax, and corresponding
      psql \copy syntax. Like with reading/writing files, the backend version is
      superuser-only, and in the psql version, the program is run in the client.
      
      In the passing, the psql \copy STDIN/STDOUT syntax is subtly changed: if you
      the stdin/stdout is quoted, it's now interpreted as a filename. For example,
      "\copy foo from 'stdin'" now reads from a file called 'stdin', not from
      standard input. Before this, there was no way to specify a filename called
      stdin, stdout, pstdin or pstdout.
      
      This creates a new function in pgport, wait_result_to_str(), which can
      be used to convert the exit status of a process, as returned by wait(3),
      to a human-readable string.
      
      Etsuro Fujita, reviewed by Amit Kapila.
      3d009e45
  9. Feb 25, 2013
  10. Feb 24, 2013
  11. Feb 23, 2013
  12. Feb 22, 2013
    • Alvaro Herrera's avatar
      Fix some typos and grammatical mistakes · 45919335
      Alvaro Herrera authored
      ... as well a update copyrights statements to 2013.
      
      Noted by Thom Brown and Peter Geoghegan
      45919335
    • Alvaro Herrera's avatar
      Add pg_xlogdump contrib program · 639ed4e8
      Alvaro Herrera authored
      This program relies on rm_desc backend routines and the xlogreader
      infrastructure to emit human-readable rendering of WAL records.
      
      Author: Andres Freund, with many reworks by Álvaro
      Reviewed (in a much earlier version) by Peter Eisentraut
      639ed4e8
  13. Feb 21, 2013
    • Tom Lane's avatar
      Add postgres_fdw contrib module. · d0d75c40
      Tom Lane authored
      There's still a lot of room for improvement, but it basically works,
      and we need this to be present before we can do anything much with the
      writable-foreign-tables patch.  So let's commit it and get on with testing.
      
      Shigeru Hanada, reviewed by KaiGai Kohei and Tom Lane
      d0d75c40
  14. Feb 18, 2013
    • Peter Eisentraut's avatar
      Add ALTER ROLE ALL SET command · 9475db3a
      Peter Eisentraut authored
      This generalizes the existing ALTER ROLE ... SET and ALTER DATABASE
      ... SET functionality to allow creating settings that apply to all users
      in all databases.
      
      reviewed by Pavel Stehule
      9475db3a
  15. Feb 14, 2013
  16. Feb 11, 2013
    • Heikki Linnakangas's avatar
      Support unlogged GiST index. · 62401db4
      Heikki Linnakangas authored
      The reason this wasn't supported before was that GiST indexes need an
      increasing sequence to detect concurrent page-splits. In a regular WAL-
      logged GiST index, the LSN of the page-split record is used for that
      purpose, and in a temporary index, we can get away with a backend-local
      counter. Neither of those methods works for an unlogged relation.
      
      To provide such an increasing sequence of numbers, create a "fake LSN"
      counter that is saved and restored across shutdowns. On recovery, unlogged
      relations are blown away, so the counter doesn't need to survive that
      either.
      
      Jeevan Chalke, based on discussions with Robert Haas, Tom Lane and me.
      62401db4
  17. Feb 09, 2013
  18. Feb 08, 2013
    • Tom Lane's avatar
      doc: Fix mistakes in the most recent set of release notes. · 335c5e92
      Tom Lane authored
      Improve description of the vacuum_freeze_table_age bug (it's much more
      serious than we realized at the time the fix was committed), and correct
      attribution of pg_upgrade -O/-o fix (Marti Raudsepp contributed that,
      but Bruce forgot to credit him in the commit log).
      
      No need to back-patch right now, it'll happen when the next set of
      release notes are prepared.
      335c5e92
    • Peter Eisentraut's avatar
      doc: Rewrite how to get the source code · 858ef718
      Peter Eisentraut authored
      Instead of hardcoding a specific link, give a general link to the
      download section of the web site.  This gives the user more download
      options and the sysadmins more flexibility.  Also, the previously
      presented link didn't work for devel versions.
      858ef718
  19. Feb 06, 2013
  20. Feb 04, 2013
    • Tom Lane's avatar
      Prevent execution of enum_recv() from SQL. · ab0f7b60
      Tom Lane authored
      This function was misdeclared to take cstring when it should take internal.
      This at least allows crashing the server, and in principle an attacker
      might be able to use the function to examine the contents of server memory.
      
      The correct fix is to adjust the system catalog contents (and fix the
      regression tests that should have caught this but failed to).  However,
      asking users to correct the catalog contents in existing installations
      is a pain, so as a band-aid fix for the back branches, install a check
      in enum_recv() to make it throw error if called with a cstring argument.
      We will later revert this in HEAD in favor of correcting the catalogs.
      
      Our thanks to Sumit Soni (via Secunia SVCRP) for reporting this issue.
      
      Security: CVE-2013-0255
      ab0f7b60
    • Tom Lane's avatar
    • Simon Riggs's avatar
      Reset vacuum_defer_cleanup_age to PGC_SIGHUP. · f480e294
      Simon Riggs authored
      Revert commit 84725aa5
      f480e294
    • Simon Riggs's avatar
      Reset master xmin when hot_standby_feedback disabled. · bd56e741
      Simon Riggs authored
      If walsender has xmin of standby then ensure we
      reset the value to 0 when we change from hot_standby_feedback=on
      to hot_standby_feedback=off.
      bd56e741
  21. Feb 03, 2013
    • Tom Lane's avatar
      Perform line wrapping and indenting by default in ruleutils.c. · 62e66640
      Tom Lane authored
      This patch changes pg_get_viewdef() and allied functions so that
      PRETTY_INDENT processing is always enabled.  Per discussion, only the
      PRETTY_PAREN processing (that is, stripping of "unnecessary" parentheses)
      poses any real forward-compatibility risk, so we may as well make dump
      output look as nice as we safely can.
      
      Also, set the default wrap length to zero (i.e, wrap after each SELECT
      or FROM list item), since there's no very principled argument for the
      former default of 80-column wrapping, and most people seem to agree this
      way looks better.
      
      Marko Tiikkaja, reviewed by Jeevan Chalke, further hacking by Tom Lane
      62e66640
    • Peter Eisentraut's avatar
      PL/Python: Add result object str handler · 330ed4ac
      Peter Eisentraut authored
      This is intended so that say plpy.debug(rv) prints something useful for
      debugging query execution results.
      
      reviewed by Steve Singer
      330ed4ac
  22. Feb 02, 2013
    • Tom Lane's avatar
      Create a psql command \gset to store query results into psql variables. · d2d153fd
      Tom Lane authored
      This eases manipulation of query results in psql scripts.
      
      Pavel Stehule, reviewed by Piyush Newe, Shigeru Hanada, and Tom Lane
      d2d153fd
    • Tom Lane's avatar
      Prevent "\g filename" from affecting subsequent commands after an error. · 101d6ae7
      Tom Lane authored
      In the previous coding, psql's state variable saying that output should
      go to a file was only reset after successful completion of a query
      returning tuples.  Thus for example,
      
      regression=# select 1/0
      regression-# \g somefile
      ERROR:  division by zero
      regression=# select 1/2;
      regression=#
      
      ... huh, I wonder where that output went.  Even more oddly, the state
      was not reset even if it's the file that's causing the failure:
      
      regression=# select 1/2 \g /foo
      /foo: Permission denied
      regression=# select 1/2;
      /foo: Permission denied
      regression=# select 1/2;
      /foo: Permission denied
      
      This seems to me not to satisfy the principle of least surprise.
      \g is certainly not documented in a way that suggests its effects are
      at all persistent.
      
      To fix, adjust the code so that the flag is reset at exit from SendQuery
      no matter what happened.
      
      Noted while reviewing the \gset patch, which had comparable issues.
      Arguably this is a bug fix, but I'll refrain from back-patching for now.
      101d6ae7
    • Simon Riggs's avatar
      Mark vacuum_defer_cleanup_age as PGC_POSTMASTER. · 84725aa5
      Simon Riggs authored
      Following bug analysis of #7819 by Tom Lane
      84725aa5
Loading