summaryrefslogtreecommitdiff
path: root/doc/src
AgeCommit message (Collapse)Author
2014-04-16docs: properly document psql auto encoding modeBruce Momjian
In psql, both stdin and stdout must be terminals to get a client encoding of 'auto'. Patch by Albe Laurenz Backpatch to 9.3.
2014-04-16doc: move min_recovery_apply_delay into the right sectionBruce Momjian
Patch by Fujii Masao
2014-04-16docs: make max_wal_senders higher to handle disconnectsBruce Momjian
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
2014-04-16Add to_regprocedure() and to_regoperator().Robert Haas
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.
2014-04-16doc: fix json_extract_path_text() typo by adding jsonbBruce Momjian
Report from rudolf <stu3.1@eq.cz>
2014-04-15psql: conditionally display oids and replication identityBruce Momjian
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.
2014-04-15vacuumdb: Add option --analyze-in-stagesPeter Eisentraut
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.
2014-04-14Add TAP tests for client programsPeter Eisentraut
Reviewed-by: Pavel Stěhule <pavel.stehule@gmail.com> Reviewed-by: Erik Rijkers <er@xs4all.nl>
2014-04-14doc: Suggesting clearing pg_replslot from a hot filesystem backup.Robert Haas
Maybe we'll settle on another way of solving this problem, but for now this is the recommended procedure. Per discussion with Michael Paquier.
2014-04-14doc: Update yet another place that didn't get the memo about matviews.Robert Haas
Etsuro Fujita
2014-04-14Correct description of constraint_name in ALTER TABLE documentation.Robert Haas
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
2014-04-14Update list of relation types on which ALTER TABLE RENAME/OWNER work.Robert Haas
Etsuro Fujita
2014-04-12Make security barrier views automatically updatableStephen Frost
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
2014-04-12Create infrastructure for moving-aggregate optimization.Tom Lane
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
2014-04-10docs: psql '--' comments are not passed to the serverBruce Momjian
C-style block comments are passed to the server.
2014-04-09docs: add link to pg_start_backup() from pg_basebackup --checkpointBruce Momjian
This references the meaning of the fast/spread checkpoint option. Per private IM report
2014-04-08Add an in-core GiST index opclass for inet/cidr types.Tom Lane
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
2014-04-08doc: Fix typo.Robert Haas
Ian Barwick
2014-04-08Add new to_reg* functions for error-free OID lookups.Robert Haas
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.
2014-04-06Extra warnings and errors for PL/pgSQLSimon Riggs
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
2014-04-06Reduce lock levels of some ALTER TABLE cmdsSimon Riggs
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
2014-04-03Fix non-equivalence of VARIADIC and non-VARIADIC function call formats.Tom Lane
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.
2014-04-03Fix documentation about joining pg_locks to other views.Tom Lane
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
2014-04-03Avoid promising that "ADD COLUMN ... DEFAULT NULL" is free.Tom Lane
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.
2014-04-01Doc: improve discussion of reverse+forward host name lookup in pg_hba.conf.Tom Lane
Fix some grammatical issues and make it a bit more readable.
2014-03-29Revert "Secure Unix-domain sockets of "make check" temporary clusters."Noah Misch
About half of the buildfarm members use too-long directory names, strongly suggesting that this approach is a dead end.
2014-03-29Secure Unix-domain sockets of "make check" temporary clusters.Noah Misch
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
2014-03-29Document platform-specificity of unix_socket_permissions.Noah Misch
Back-patch to 8.4 (all supported versions).
2014-03-27Improve documentation note about Python 2.3 and cdecimal.Tom Lane
Explain exactly what fails (ie, function arguments of type numeric) if you don't have it.
2014-03-26Document that Python 2.3 requires cdecimal module for full functionality.Tom Lane
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.
2014-03-26Cleanup around json_to_record/json_to_recordsetAndrew Dunstan
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).
2014-03-26Add -f/--follow option to pg_xlogdump.Heikki Linnakangas
This is useful for seeing what WAL records are inserted in real-time, by pointing pg_xlogdump to a live server.
2014-03-25Fix typos in pg_basebackup documentationMagnus Hagander
Joshua Tolley
2014-03-24doc: list unlogged tables as a non-durable optionBruce Momjian
2014-03-24Remove wchar.c Asserts that were stricter than the main codeBruce Momjian
Assert errors were thrown for functions being passed invalid encodings, while the main code handled it just fine. Also document that libpq's PQclientEncoding() returns -1 for an encoding lookup failure. Per report from Peter Geoghegan
2014-03-24docs: Add short "cover density" descriptionBruce Momjian
Also, previous commit 1420f3a9827a39e5c6c998f6fa35a6fc97903145 to fix ts_rank_cd() for stripped lexemes was from a patch created by Alex Hill.
2014-03-24Fix ts_rank_cd() to ignore stripped lexemesBruce Momjian
Previously, stripped lexemes got a default location and could be considered if mixed with non-stripped lexemes. BACKWARD INCOMPATIBILITY CHANGE
2014-03-24Fix START_REPLICATION syntax in document.Fujii Masao
Enclose "TIMELINE tli" part with brackets because it's optional. Backport to 9.3 where TIMELINE option was introduced. Noted by Marko Tiikkaja
2014-03-24Fix "the the" typos.Heikki Linnakangas
Erik Rijkers
2014-03-23Fix mis-spelling in jsonb docs.Andrew Dunstan
Per Thom Brown.
2014-03-23Introduce jsonb, a structured format for storing json.Andrew Dunstan
The new format accepts exactly the same data as the json type. However, it is stored in a format that does not require reparsing the orgiginal text in order to process it, making it much more suitable for indexing and other operations. Insignificant whitespace is discarded, and the order of object keys is not preserved. Neither are duplicate object keys kept - the later value for a given key is the only one stored. The new type has all the functions and operators that the json type has, with the exception of the json generation functions (to_json, json_agg etc.) and with identical semantics. In addition, there are operator classes for hash and btree indexing, and two classes for GIN indexing, that have no equivalent in the json type. This feature grew out of previous work by Oleg Bartunov and Teodor Sigaev, which was intended to provide similar facilities to a nested hstore type, but which in the end proved to have some significant compatibility issues. Authors: Oleg Bartunov, Teodor Sigaev, Peter Geoghegan and Andrew Dunstan. Review: Andres Freund
2014-03-23Offer triggers on foreign tables.Noah Misch
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.
2014-03-19Some minor improvements to logical decoding document.Fujii Masao
Also improve help message in pg_recvlogical.
2014-03-18Logical decoding documentation corrections.Robert Haas
Thom Brown
2014-03-18Documentation for logical decoding.Robert Haas
Craig Ringer, Andres Freund, Christian Kruse, with edits by me.
2014-03-18Fix help message and document in pg_receivexlog.Fujii Masao
Add SLOTNAME placeholder to --slot option in help message and document.
2014-03-17Release notes for 9.3.4, 9.2.8, 9.1.13, 9.0.17, 8.4.21.Tom Lane
2014-03-17Fix typos in comments.Fujii Masao
Thom Brown
2014-03-16Cleanups from the remove-native-krb5 patchMagnus Hagander
krb_srvname is actually not available anymore as a parameter server-side, since with gssapi we accept all principals in our keytab. It's still used in libpq for client side specification. In passing remove declaration of krb_server_hostname, where all the functionality was already removed. Noted by Stephen Frost, though a different solution than his suggestion
2014-03-15First-draft release notes for 9.3.4.Tom Lane
As usual, the release notes for older branches will be made by cutting these down, but put them up for community review first.