aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref
Commit message (Collapse)AuthorAge
* Expose -S option in pg_receivexlog.Fujii Masao2014-08-13
| | | | | | | | | | | | This option is equivalent to --slot option which pg_receivexlog has already supported, which specifies the replication slot to use for WAL streaming. pg_recvlogical has already supported both options, and this commit makes pg_receivexlog consistent with pg_recvlogical regarding the slot option. Back-patch to 9.4 where the slot option was added. Michael Paquier
* Add tab-completion for \unset and valid setting values of psql variables.Fujii Masao2014-08-12
| | | | | | | | | | | | | This commit also changes tab-completion for \set so that it displays all the special variables like COMP_KEYWORD_CASE. Previously it displayed only variables having the set values. Which was not user-friendly for those who want to set the unset variables. This commit also changes tab-completion for :variable so that only the variables having the set values are displayed. Previously even unset variables were displayed. Pavel Stehule, modified by me.
* Add -F option to pg_receivexlog, for specifying fsync interval.Fujii Masao2014-08-08
| | | | | | | | | This allows us to specify the maximum time to issue fsync to ensure the received WAL file is safely flushed to disk. Without this, pg_receivexlog always flushes WAL file only when it's closed and which can cause WAL data to be lost at the event of a crash. Furuya Osamu, heavily modified by me.
* doc: Fix up ALTER TABLESPACE reference pagePeter Eisentraut2014-07-26
| | | | | | The documentation of ALTER TABLESPACE ... MOVE was added without any markup, not even paragraph breaks. Fix that, and clarify the text in a few places.
* docs: Improve documentation of \pset without arguments.Robert Haas2014-07-24
| | | | | | | | | The syntax summary previously failed to clarify that the first argument is also optional. The textual description did mention it, but all the way at the bottom. It fits better with the command overview, so move it there, and fix the summary also. Dilip Kumar, reviewed by Fabien Coelho
* Add option to pg_ctl to choose event source for loggingMagnus Hagander2014-07-17
| | | | | | | | | | | pg_ctl will log to the Windows event log when it is running as a service, which is the primary way of running PostgreSQL on Windows. This option makes it possible to specify which event source to use for this, in order to separate different instances. The server logging itself is still controlled by the regular logging parameters, including a separate setting for the event source. The parameter to pg_ctl only controlls the logging from pg_ctl itself. MauMau, review in many iterations by Amit Kapila and me.
* doc: Spell checkingPeter Eisentraut2014-07-16
|
* doc: Put new options in right order on reference pagesPeter Eisentraut2014-07-15
|
* Add missing doc changes for ee80f043bc9bAlvaro Herrera2014-07-15
| | | | Per note from Tom Lane
* doc: small fixes for REINDEX reference pagePeter Eisentraut2014-07-14
| | | | From: Josh Kupershmidt <schmiddy@gmail.com>
* Implement IMPORT FOREIGN SCHEMA.Tom Lane2014-07-10
| | | | | | | | | | | This command provides an automated way to create foreign table definitions that match remote tables, thereby reducing tedium and chances for error. In this patch, we provide the necessary core-server infrastructure and implement the feature fully in the postgres_fdw foreign-data wrapper. Other wrappers will throw a "feature not supported" error until/unless they are updated. Ronan Dunklau and Michael Paquier, additional work by me
* Add new ECHO mode 'errors' that displays only failed commands in psql.Fujii Masao2014-07-10
| | | | | | | | | When the psql variable ECHO is set to 'erros', only failed SQL commands are printed to standard error output. Also this patch adds -b option into psql. This is equivalent to setting the variable ECHO to 'errors'. Pavel Stehule, reviewed by Fabrízio de Royes Mello, Samrat Revagade, Kumar Rajeev Rastogi, Abhijit Menon-Sen, and me.
* Fix whitespacePeter Eisentraut2014-07-08
|
* Allow CREATE/ALTER DATABASE to manipulate datistemplate and datallowconn.Tom Lane2014-07-01
| | | | | | | | | | | Historically these database properties could be manipulated only by manually updating pg_database, which is error-prone and only possible for superusers. But there seems no good reason not to allow database owners to set them for their databases, so invent CREATE/ALTER DATABASE options to do that. Adjust a couple of places that were doing it the hard way to use the commands instead. Vik Fearing, reviewed by Pavel Stehule
* Fix documentation template for CREATE TRIGGER.Kevin Grittner2014-06-21
| | | | | | | | | By using curly braces, the template had specified that one of "NOT DEFERRABLE", "INITIALLY IMMEDIATE", or "INITIALLY DEFERRED" was required on any CREATE TRIGGER statement, which is not accurate. Change to square brackets makes that optional. Backpatch to 9.1, where the error was introduced.
* Don't allow to disable backend assertions via the debug_assertions GUC.Andres Freund2014-06-20
| | | | | | | | | | | | | | | | | | | | The existance of the assert_enabled variable (backing the debug_assertions GUC) reduced the amount of knowledge some static code checkers (like coverity and various compilers) could infer from the existance of the assertion. That could have been solved by optionally removing the assertion_enabled variable from the Assert() et al macros at compile time when some special macro is defined, but the resulting complication doesn't seem to be worth the gain from having debug_assertions. Recompiling is fast enough. The debug_assertions GUC is still available, but readonly, as it's useful when diagnosing problems. The commandline/client startup option -A, which previously also allowed to enable/disable assertions, has been removed as it doesn't serve a purpose anymore. While at it, reduce code duplication in bufmgr.c and localbuf.c assertions checking for spurious buffer pins. That code had to be reindented anyway to cope with the assert_enabled removal.
* Don't allow data_directory to be set in postgresql.auto.conf by ALTER SYSTEM.Fujii Masao2014-06-19
| | | | | | | | | | data_directory could be set both in postgresql.conf and postgresql.auto.conf so far. This could cause some problematic situations like circular definition. To avoid such situations, this commit forbids a user to set data_directory in postgresql.auto.conf. Backpatch this to 9.4 where ALTER SYSTEM command was introduced. Amit Kapila, reviewed by Abhijit Menon-Sen, with minor adjustments by me.
* Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ...Tom Lane2014-06-18
| | | | | | | | | | | | | | | | This SQL-standard feature allows a sub-SELECT yielding multiple columns (but only one row) to be used to compute the new values of several columns to be updated. While the same results can be had with an independent sub-SELECT per column, such a workaround can require a great deal of duplicated computation. The standard actually says that the source for a multi-column assignment could be any row-valued expression. The implementation used here is tightly tied to our existing sub-SELECT support and can't handle other cases; the Bison grammar would have some issues with them too. However, I don't feel too bad about this since other cases can be converted into sub-SELECTs. For instance, "SET (a,b,c) = row_valued_function(x)" could be written "SET (a,b,c) = (SELECT * FROM row_valued_function(x))".
* Misc message style and doc fixes.Heikki Linnakangas2014-05-15
| | | | Euler Taveira
* doc: Clarify what files pg_basebackup omits from data directoryPeter Eisentraut2014-05-14
|
* doc: Fix DocBook XML validityPeter Eisentraut2014-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | The main problem is that DocBook SGML allows indexterm elements just about everywhere, but DocBook XML is stricter. For example, this common pattern <varlistentry> <indexterm>...</indexterm> <term>...</term> ... </varlistentry> needs to be changed to something like <varlistentry> <term>...<indexterm>...</indexterm></term> ... </varlistentry> See also bb4eefe7bf518e42c73797ea37b033a5d8a8e70a. There is currently nothing in the build system that enforces that things stay valid, because that requires additional tools and will receive separate consideration.
* doc: Update pg_basebackup version compatibility claim for 9.4Peter Eisentraut2014-05-01
|
* Minor fixes for ALTER TABLE documentation.Robert Haas2014-04-28
| | | | Etsuro Fujita
* Allow polymorphic aggregates to have non-polymorphic state data types.Tom Lane2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 9.4, such an aggregate couldn't be declared, because its final function would have to have polymorphic result type but no polymorphic argument, which CREATE FUNCTION would quite properly reject. The ordered-set-aggregate patch found a workaround: allow the final function to be declared as accepting additional dummy arguments that have types matching the aggregate's regular input arguments. However, we failed to notice that this problem applies just as much to regular aggregates, despite the fact that we had a built-in regular aggregate array_agg() that was known to be undeclarable in SQL because its final function had an illegal signature. So what we should have done, and what this patch does, is to decouple the extra-dummy-arguments behavior from ordered-set aggregates and make it generally available for all aggregate declarations. We have to put this into 9.4 rather than waiting till later because it slightly alters the rules for declaring ordered-set aggregates. The patch turned out a bit bigger than I'd hoped because it proved necessary to record the extra-arguments option in a new pg_aggregate column. I'd thought we could just look at the final function's pronargs at runtime, but that didn't work well for variadic final functions. It's probably just as well though, because it simplifies life for pg_dump to record the option explicitly. While at it, fix array_agg() to have a valid final-function signature, and add an opr_sanity test to notice future deviations from polymorphic consistency. I also marked the percentile_cont() aggregates as not needing extra arguments, since they don't.
* doc: adjust 9970443640b4569cf72b3c8e84abe80bdf533c7f for "null string"Bruce Momjian2014-04-22
| | | | Report by Andrew Dunstan
* doc: improve wording of COPY commit 7ec73783d88a743799b0c262f1235f772497fb1dBruce Momjian2014-04-22
|
* doc: mention CREATE MATERIALIZED VIEW AS can be EXPLAINedBruce Momjian2014-04-22
| | | | | | | | Patch by Amit Langote Report by Backpatch through
* doc: improve CREATE RULE event listBruce Momjian2014-04-22
| | | | | | Patch by Fujii Masao Report by Emanuel Calvo
* copy: update docs for FORCE_NULL and FORCE_NOT_NULL combinationBruce Momjian2014-04-22
| | | | | | Also update regression tests Patch by Michael Paquier
* doc: CREATE DATABASE doesn't copy template database-level config paramsBruce Momjian2014-04-19
| | | | Report by Alexey Bashtanov
* docs: tablespaces cannot be accessed independentlyBruce Momjian2014-04-19
| | | | | | | | Mention impossibility of moving tablespaces, backing them up independently, or the inadvisability of placing them on temporary file systems. Patch by Craig Ringer, adjustments by Ian Lawrence Warwick and me
* Rename EXPLAIN ANALYZE's "total runtime" output to "execution time".Tom Lane2014-04-16
| | | | | | | | | | | | | Now that EXPLAIN also outputs a "planning time" measurement, the use of "total" here seems rather confusing: it sounds like it might include the planning time which of course it doesn't. Majority opinion was that "execution time" is a better label, so we'll call it that. This should be noted as a backwards incompatibility for tools that examine EXPLAIN ANALYZE output. In passing, I failed to resist the temptation to do a little editing on the materialized-view example affected by this change.
* docs: properly document psql auto encoding modeBruce Momjian2014-04-16
| | | | | | | | | In psql, both stdin and stdout must be terminals to get a client encoding of 'auto'. Patch by Albe Laurenz Backpatch to 9.3.
* psql: conditionally display oids and replication identityBruce Momjian2014-04-15
| | | | | | | In psql \d+, display oids only when they exist, and display replication identity only when it is non-default. Also document the defaults for replication identity for system and non-system tables. Update regression output.
* vacuumdb: Add option --analyze-in-stagesPeter Eisentraut2014-04-15
| | | | | | | | | | Add vacuumdb option --analyze-in-stages which runs ANALYZE three times with different configuration settings, adopting the logic from the analyze_new_cluster.sh script that pg_upgrade generates. That way, users of pg_dump/pg_restore can also use that functionality. Change pg_upgrade to create the script so that it calls vacuumdb instead of implementing the logic itself.
* doc: Update yet another place that didn't get the memo about matviews.Robert Haas2014-04-14
| | | | Etsuro Fujita
* Correct description of constraint_name in ALTER TABLE documentation.Robert Haas2014-04-14
| | | | | | | | Apparently, the old text was written at a time when the only use of constraint_name here was for a constraint to be dropped, but that's no longer true. Etsuro Fujita
* Update list of relation types on which ALTER TABLE RENAME/OWNER work.Robert Haas2014-04-14
| | | | Etsuro Fujita
* Make security barrier views automatically updatableStephen Frost2014-04-12
| | | | | | | | | | | | | | | | | Views which are marked as security_barrier must have their quals applied before any user-defined quals are called, to prevent user-defined functions from being able to see rows which the security barrier view is intended to prevent them from seeing. Remove the restriction on security barrier views being automatically updatable by adding a new securityQuals list to the RTE structure which keeps track of the quals from security barrier views at each level, independently of the user-supplied quals. When RTEs are later discovered which have securityQuals populated, they are turned into subquery RTEs which are marked as security_barrier to prevent any user-supplied quals being pushed down (modulo LEAKPROOF quals). Dean Rasheed, reviewed by Craig Ringer, Simon Riggs, KaiGai Kohei
* Create infrastructure for moving-aggregate optimization.Tom Lane2014-04-12
| | | | | | | | | | | | | | | | | | | Until now, when executing an aggregate function as a window function within a window with moving frame start (that is, any frame start mode except UNBOUNDED PRECEDING), we had to recalculate the aggregate from scratch each time the frame head moved. This patch allows an aggregate definition to include an alternate "moving aggregate" implementation that includes an inverse transition function for removing rows from the aggregate's running state. As long as this can be done successfully, runtime is proportional to the total number of input rows, rather than to the number of input rows times the average frame length. This commit includes the core infrastructure, documentation, and regression tests using user-defined aggregates. Follow-on commits will update some of the built-in aggregates to use this feature. David Rowley and Florian Pflug, reviewed by Dean Rasheed; additional hacking by me
* docs: psql '--' comments are not passed to the serverBruce Momjian2014-04-10
| | | | C-style block comments are passed to the server.
* docs: add link to pg_start_backup() from pg_basebackup --checkpointBruce Momjian2014-04-09
| | | | | | This references the meaning of the fast/spread checkpoint option. Per private IM report
* Reduce lock levels of some ALTER TABLE cmdsSimon Riggs2014-04-06
| | | | | | | | | | | | | | | | | VALIDATE CONSTRAINT CLUSTER ON SET WITHOUT CLUSTER ALTER COLUMN SET STATISTICS ALTER COLUMN SET () ALTER COLUMN RESET () All other sub-commands use AccessExclusiveLock Simon Riggs and Noah Misch Reviews by Robert Haas and Andres Freund
* Avoid promising that "ADD COLUMN ... DEFAULT NULL" is free.Tom Lane2014-04-03
| | | | | | | | | The system realizes that DEFAULT NULL is dummy in simple cases, but not if a cast function (such as a length coercion) needs to be applied. It's dubious that suppressing that function call would be appropriate, anyway. For the moment, let's just adjust the docs to say that you should omit the DEFAULT clause if you don't want a rewrite to happen. Per gripe from Amit Langote.
* Fix typos in pg_basebackup documentationMagnus Hagander2014-03-25
| | | | Joshua Tolley
* Offer triggers on foreign tables.Noah Misch2014-03-23
| | | | | | | | | | | | | | | | | This covers all the SQL-standard trigger types supported for regular tables; it does not cover constraint triggers. The approach for acquiring the old row mirrors that for view INSTEAD OF triggers. For AFTER ROW triggers, we spool the foreign tuples to a tuplestore. This changes the FDW API contract; when deciding which columns to populate in the slot returned from data modification callbacks, writable FDWs will need to check for AFTER ROW triggers in addition to checking for a RETURNING clause. In support of the feature addition, refactor the TriggerFlags bits and the assembly of old tuples in ModifyTable. Ronan Dunklau, reviewed by KaiGai Kohei; some additional hacking by me.
* Documentation for logical decoding.Robert Haas2014-03-18
| | | | Craig Ringer, Andres Freund, Christian Kruse, with edits by me.
* Fix help message and document in pg_receivexlog.Fujii Masao2014-03-18
| | | | | Add SLOTNAME placeholder to --slot option in help message and document.
* Allow psql to print COPY command status in more cases.Tom Lane2014-03-13
| | | | | | | | | | | | | | Previously, psql would print the "COPY nnn" command status only for COPY commands executed server-side. Now it will print that for frontend copies too (including \copy). However, we continue to suppress the command status for COPY TO STDOUT, since in that case the copy data has been routed to the same place that the command status would go, and there is a risk of the status line being mistaken for another line of COPY data. Doing that would break existing scripts, and it doesn't seem worth the benefit --- this case seems fairly analogous to SELECT, for which we also suppress the command status. Kumar Rajeev Rastogi, with substantial review by Amit Khandekar
* pg_ctl: improve handling of invalid data directoryBruce Momjian2014-03-08
| | | | | | | | | Return '4' and report a meaningful error message when a non-existent or invalid data directory is passed. Previously, pg_ctl would just report the server was not running. Patch by me and Amit Kapila Report from Peter Eisentraut