aboutsummaryrefslogtreecommitdiff
path: root/doc/src
Commit message (Collapse)AuthorAge
...
* 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: Fix DocBook table column count declarationPeter Eisentraut2014-04-23
| | | | This was broken in 26cd1d7d9513b2b490efc746551ec5a786b56212.
* Fix typo, trance -> tranche, in docs.Heikki Linnakangas2014-04-23
| | | | Amit Langote
* 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
* docs: add results for JSON operator examplesBruce Momjian2014-04-22
| | | | Patch by Sehrope Sarkuni
* docs: clearify use of pg_database.datistemplateBruce Momjian2014-04-22
| | | | Patch by Rajeev rastogi
* 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: Improve "replication slot" index entriesPeter Eisentraut2014-04-22
| | | | | Now that we have accumulated two different "replication slot" concepts, make the index entries consistent.
* doc: CREATE DATABASE doesn't copy template database-level config paramsBruce Momjian2014-04-19
| | | | Report by Alexey Bashtanov
* doc: mention archive_command and recovery_command are exec'ed locallyBruce Momjian2014-04-19
| | | | Report by Craig Ringer
* 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
* libpq: have PQconnectdbParams() and PQpingParams accept "" as defaultBruce Momjian2014-04-19
| | | | | | | | | | | | | Previously, these functions treated "" optin values as defaults in some ways, but not in others, like when comparing to .pgpass. Also, add documentation to clarify that now "" and NULL use defaults, like PQsetdbLogin() has always done. BACKWARD INCOMPATIBILITY Patch by Adrian Vondendriesch, docs by me Report by Jeff Janes
* docs: adjustments for streaming standbys that disconnect frequentlyBruce Momjian2014-04-17
| | | | | | | | Document problems when disconnection causes loss of hot_standby_feedback and suggest adjusting max_standby_archive_delay and max_standby_streaming_delay. Initial patch by Marko Tiikkaja, adjustments by 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.
* doc: move min_recovery_apply_delay into the right sectionBruce Momjian2014-04-16
| | | | Patch by Fujii Masao
* docs: make max_wal_senders higher to handle disconnectsBruce Momjian2014-04-16
| | | | | | | | Document abrupt streaming client disconnection might leave slots in use, so max_wal_senders should be slightly higher than needed to allow for immediate reconnection. Per mention by Magnus
* Add to_regprocedure() and to_regoperator().Robert Haas2014-04-16
| | | | | | | | | These are natural complements to the functions added by commit 0886fc6a5c75b294544263ea979b9cf6195407d9, but they weren't included in the original patch for some reason. Add them. Patch by me, per a complaint by Tom Lane. Review by Tatsuo Ishii.
* doc: fix json_extract_path_text() typo by adding jsonbBruce Momjian2014-04-16
| | | | Report from rudolf <stu3.1@eq.cz>
* 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.
* Add TAP tests for client programsPeter Eisentraut2014-04-14
| | | | | Reviewed-by: Pavel Stěhule <pavel.stehule@gmail.com> Reviewed-by: Erik Rijkers <er@xs4all.nl>
* doc: Suggesting clearing pg_replslot from a hot filesystem backup.Robert Haas2014-04-14
| | | | | | | Maybe we'll settle on another way of solving this problem, but for now this is the recommended procedure. Per discussion with Michael Paquier.
* 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
* Add an in-core GiST index opclass for inet/cidr types.Tom Lane2014-04-08
| | | | | | | | | | | | | | | | | | | | | | This operator class can accelerate subnet/supernet tests as well as btree-equivalent ordered comparisons. It also handles a new network operator inet && inet (overlaps, a/k/a "is supernet or subnet of"), which is expected to be useful in exclusion constraints. Ideally this opclass would be the default for GiST with inet/cidr data, but we can't mark it that way until we figure out how to do a more or less graceful transition from the current situation, in which the really-completely-bogus inet/cidr opclasses in contrib/btree_gist are marked as default. Having the opclass in core and not default is better than not having it at all, though. While at it, add new documentation sections to allow us to officially document GiST/GIN/SP-GiST opclasses, something there was never a clear place to do before. I filled these in with some simple tables listing the existing opclasses and the operators they support, but there's certainly scope to put more information there. Emre Hasegeli, reviewed by Andreas Karlsson, further hacking by me
* doc: Fix typo.Robert Haas2014-04-08
| | | | Ian Barwick
* Add new to_reg* functions for error-free OID lookups.Robert Haas2014-04-08
| | | | | | | | | These functions won't throw an error if the object doesn't exist, or if (for functions and operators) there's more than one matching object. Yugo Nagata and Nozomi Anzai, reviewed by Amit Khandekar, Marti Raudsepp, Amit Kapila, and me.
* Extra warnings and errors for PL/pgSQLSimon Riggs2014-04-06
| | | | | | | | | | | Infrastructure to allow plpgsql.extra_warnings plpgsql.extra_errors Initial extra checks only for shadowed_variables Marko Tiikkaja and Petr Jelinek Reviewed by Simon Riggs and Pavel Stěhule
* 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
* Fix non-equivalence of VARIADIC and non-VARIADIC function call formats.Tom Lane2014-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For variadic functions (other than VARIADIC ANY), the syntaxes foo(x,y,...) and foo(VARIADIC ARRAY[x,y,...]) should be considered equivalent, since the former is converted to the latter at parse time. They have indeed been equivalent, in all releases before 9.3. However, commit 75b39e790 made an ill-considered decision to record which syntax had been used in FuncExpr nodes, and then to make equal() test that in checking node equality --- which caused the syntaxes to not be seen as equivalent by the planner. This is the underlying cause of bug #9817 from Dmitry Ryabov. It might seem that a quick fix would be to make equal() disregard FuncExpr.funcvariadic, but the same commit made that untenable, because the field actually *is* semantically significant for some VARIADIC ANY functions. This patch instead adopts the approach of redefining funcvariadic (and aggvariadic, in HEAD) as meaning that the last argument is a variadic array, whether it got that way by parser intervention or was supplied explicitly by the user. Therefore the value will always be true for non-ANY variadic functions, restoring the principle of equivalence. (However, the planner will continue to consider use of VARIADIC as a meaningful difference for VARIADIC ANY functions, even though some such functions might disregard it.) In HEAD, this change lets us simplify the decompilation logic in ruleutils.c, since the funcvariadic/aggvariadic flag tells directly whether to print VARIADIC. However, in 9.3 we have to continue to cope with existing stored rules/views that might contain the previous definition. Fortunately, this just means no change in ruleutils.c, since its existing behavior effectively ignores funcvariadic for all cases other than VARIADIC ANY functions. In HEAD, bump catversion to reflect the fact that FuncExpr.funcvariadic changed meanings; this is sort of pro forma, since I don't believe any built-in views are affected. Unfortunately, this patch doesn't magically fix everything for affected 9.3 users. After installing 9.3.5, they might need to recreate their rules/views/indexes containing variadic function calls in order to get everything consistent with the new definition. As in the cited bug, the symptom of a problem would be failure to use a nominally matching index that has a variadic function call in its definition. We'll need to mention this in the 9.3.5 release notes.
* Fix documentation about joining pg_locks to other views.Tom Lane2014-04-03
| | | | | | | | | | | The advice to join to pg_prepared_xacts via the transaction column was not updated when the transaction column was replaced by virtualtransaction. Since it's not quite obvious how to do that join, give an explicit example. For consistency also give an example for the adjacent case of joining to pg_stat_activity. And link-ify the view references too, just because we can. Per bug #9840 from Alexey Bashtanov. Michael Paquier and Tom Lane
* 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.
* Doc: improve discussion of reverse+forward host name lookup in pg_hba.conf.Tom Lane2014-04-01
| | | | Fix some grammatical issues and make it a bit more readable.
* Revert "Secure Unix-domain sockets of "make check" temporary clusters."Noah Misch2014-03-29
| | | | | About half of the buildfarm members use too-long directory names, strongly suggesting that this approach is a dead end.
* Secure Unix-domain sockets of "make check" temporary clusters.Noah Misch2014-03-29
| | | | | | | | | | | | | | | | | | | | | Any OS user able to access the socket can connect as the bootstrap superuser and in turn execute arbitrary code as the OS user running the test. Protect against that by placing the socket in the temporary data directory, which has mode 0700 thanks to initdb. Back-patch to 8.4 (all supported versions). The hazard remains wherever the temporary cluster accepts TCP connections, notably on Windows. Attempts to run "make check" from a directory with a long name will now fail. An alternative not sharing that problem was to place the socket in a subdirectory of /tmp, but that is only secure if /tmp is sticky. The PG_REGRESS_SOCK_DIR environment variable is available as a workaround when testing from long directory paths. As a convenient side effect, this lets testing proceed smoothly in builds that override DEFAULT_PGSOCKET_DIR. Popular non-default values like /var/run/postgresql are often unwritable to the build user. Security: CVE-2014-0067
* Document platform-specificity of unix_socket_permissions.Noah Misch2014-03-29
| | | | Back-patch to 8.4 (all supported versions).
* Improve documentation note about Python 2.3 and cdecimal.Tom Lane2014-03-27
| | | | | Explain exactly what fails (ie, function arguments of type numeric) if you don't have it.
* Document that Python 2.3 requires cdecimal module for full functionality.Tom Lane2014-03-26
| | | | | | | | | This has been true for some time, but we were leaving users to discover it the hard way. Back-patch to 9.2. It might've been true before that, but we were claiming Python 2.2 compatibility before that, so I won't guess at the exact requirements back then.
* Cleanup around json_to_record/json_to_recordsetAndrew Dunstan2014-03-26
| | | | | | | | | Set function parameter names and defaults. Add jsonb versions (which the code already provided for so the actual new code is trivial). Add jsonb regression tests and docs. Bump catalog version (which I apparently forgot to do when jsonb was committed).
* Add -f/--follow option to pg_xlogdump.Heikki Linnakangas2014-03-26
| | | | | This is useful for seeing what WAL records are inserted in real-time, by pointing pg_xlogdump to a live server.