summaryrefslogtreecommitdiff
path: root/doc/src
AgeCommit message (Collapse)Author
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.
2014-03-13Allow psql to print COPY command status in more cases.Tom Lane
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
2014-03-13Fix a couple of typos in docs.Heikki Linnakangas
Thom Brown
2014-03-13Show PIDs of lock holders and waiters in log_lock_waits log message.Fujii Masao
Christian Kruse, reviewed by Kumar Rajeev Rastogi.
2014-03-12test_decoding: Documentation fix.Robert Haas
Andres Freund
2014-03-12Allow opclasses to provide tri-valued GIN consistent functions.Heikki Linnakangas
With the GIN "fast scan" feature, GIN can skip items without fetching all the keys for them, if it can prove that they don't match regardless of those keys. So far, it has done the proving by calling the boolean consistent function with all combinations of TRUE/FALSE for the unfetched keys, but since that's O(n^2), it becomes unfeasible with more than a few keys. We can avoid calling consistent with all the combinations, if we can tell the operator class implementation directly which keys are unknown. This commit includes a triConsistent function for the built-in array and tsvector opclasses. Alexander Korotkov, with some changes by me.
2014-03-10Allow logical decoding via the walsender interface.Robert Haas
In order for this to work, walsenders need the optional ability to connect to a database, so the "replication" keyword now allows true or false, for backward-compatibility, and the new value "database" (which causes the "dbname" parameter to be respected). walsender needs to loop not only when idle but also when sending decoded data to the user and when waiting for more xlog data to decode. This means that there are now three separate loops inside walsender.c; although some refactoring has been done here, this is still a bit ugly. Andres Freund, with contributions from Álvaro Herrera, and further review by me.
2014-03-08doc: remove extra whitespace in SGML markupBruce Momjian
2014-03-08pg_ctl: improve handling of invalid data directoryBruce Momjian
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