- Apr 18, 2014
-
-
Peter Eisentraut authored
Because of gcc -Wmissing-prototypes, all functions in dynamically loadable modules must have a separate prototype declaration. This is meant to detect global functions that are not declared in header files, but in cases where the function is called via dfmgr, this is redundant. Besides filling up space with boilerplate, this is a frequent source of compiler warnings in extension modules. We can fix that by creating the function prototype as part of the PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway. That makes the code of modules cleaner, because there is one less place where the entry points have to be listed, and creates an additional check that functions have the right prototype. Remove now redundant prototypes from contrib and other modules.
-
- Apr 17, 2014
-
-
Bruce Momjian authored
Specifically, on-stack memset() might be removed, so: * Replace memset() with px_memset() * Add px_memset to copy_crlf() * Add px_memset to pgp-s2k.c Patch by Marko Kreen Report by PVS-Studio Backpatch through 8.4.
-
Bruce Momjian authored
Non-existent tablespace directory references can occur if user tablespaces are created inside data directories and the data directory is renamed in preparation for running pg_upgrade, and the symbolic links are not updated. Backpatch to 9.3.
-
- Apr 16, 2014
-
-
Tom Lane authored
We were emitting "(SELECT null::typename)", which is usually interpreted as a scalar subselect, but not so much in the context "x = ANY(...)". This led to remote-side parsing failures when remote_estimate is enabled. A quick and ugly fix is to stick in an extra cast step, "((SELECT null::typename)::typename)". The cast will be thrown away as redundant by parse analysis, but not before it's done its job of making sure the grammar sees the ANY argument as an a_expr rather than a select_with_parens. Per an example from Hannu Krosing.
-
Bruce Momjian authored
The files were already included by pg_upgrade.h.
-
- Apr 15, 2014
-
-
Bruce Momjian authored
Missed in previous commit
-
Peter Eisentraut authored
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.
-
- Apr 13, 2014
-
-
Tom Lane authored
MSVC doesn't seem to like it when a constant initializer loses precision upon being assigned. David Rowley
-
- Apr 06, 2014
-
-
Tom Lane authored
When extracting trigrams from a regular expression for search of a GIN or GIST trigram index, it's useful to penalize (preferentially discard) trigrams that contain whitespace, since those are typically far more common in the index than trigrams not containing whitespace. Of course, this should only be a preference not a hard rule, since we might otherwise end up with no trigrams to search for. The previous coding tended to produce fairly inefficient trigram search sets for anchored regexp patterns, as reported by Erik Rijkers. This patch penalizes whitespace-containing trigrams, and also reduces the target number of extracted trigrams, since experience suggests that the original coding tended to select too many trigrams to search for. Alexander Korotkov, reviewed by Tom Lane
-
- Apr 04, 2014
-
-
Tom Lane authored
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 75b39e79 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.
-
- Apr 02, 2014
-
-
Tom Lane authored
Needed for strict C89 compliance.
-
- Apr 01, 2014
-
-
Heikki Linnakangas authored
Amit Langote
-
- Mar 31, 2014
-
-
Robert Haas authored
Commit 7317d8d9 changed the set of things that need to be ignored, but neglected to update .gitignore.
-
Andrew Dunstan authored
contrib/test_decoding's "make check" runs two sets of tests. Unless we specify separate output directories for each set the isolation tests will overwrite the output from the normal regression set. Doing this will help the buildfarm collect complete logs.
-
- Mar 30, 2014
-
-
Bruce Momjian authored
INDEX is already displayed on the index, and we now exclude pg_catalog. DEFAULT is not displayed.
-
- Mar 29, 2014
-
-
Noah Misch authored
About half of the buildfarm members use too-long directory names, strongly suggesting that this approach is a dead end.
-
Noah Misch authored
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
-
Noah Misch authored
-
- Mar 27, 2014
-
-
Bruce Momjian authored
Expected output has changed because of psql replica identity output changes. Reported by Christoph Berg
-
- Mar 26, 2014
-
-
Bruce Momjian authored
-
Heikki Linnakangas authored
Per buildfarm.
-
Heikki Linnakangas authored
This is useful for seeing what WAL records are inserted in real-time, by pointing pg_xlogdump to a live server.
-
- Mar 23, 2014
-
-
Andrew Dunstan authored
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
-
Noah Misch authored
Their values are unspecified and system-dependent. Per buildfarm member kouprey.
-
Noah Misch authored
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.
-
- Mar 21, 2014
-
-
Bruce Momjian authored
-
Bruce Momjian authored
Clear errno before calling readdir() and handle old MinGW errno bug while adding full test coverage for readdir/closedir failures. Backpatch through 8.4.
-
- Mar 20, 2014
-
-
Robert Haas authored
Per discussion with Tom Lane.
-
- Mar 18, 2014
-
-
Heikki Linnakangas authored
Oops. Pointed out by Andres Freund.
-
Tom Lane authored
Andres Freund and Tom Lane
-
Robert Haas authored
Commit 3bd261ca updated the API but neglected to make the corresponding edits here. Per Tom Lane and the buildfarm.
-
- Mar 17, 2014
-
-
Fujii Masao authored
Thom Brown
-
Tom Lane authored
I discovered the hard way that on some old shells, the locution FOO="" unset FOO does not behave the same as FOO=""; unset FOO and in fact leaves FOO set to an empty string. test.sh was inconsistently spelling it different ways on adjacent lines. This got broken relatively recently, in commit c737a2e5, so the lack of field reports to date doesn't represent a lot of evidence that the problem is rare.
-
- Mar 12, 2014
-
-
Robert Haas authored
Andres Freund, per complaints by Peter Eisentraut.
-
- Mar 07, 2014
-
-
Tom Lane authored
In b89e1510 I had assumed it was ok to use anonymous unions as struct members, but while a longstanding extension in many compilers, it's only been standardized in C11. To fix, remove one of the anonymous unions which tried to hide some implementation specific enum values and give the other a name. The latter unfortunately requires changes in output plugins, but since the feature has only been added a few days ago... Andres Freund
-
Tom Lane authored
The previous coding supposed that it could consider just a single join condition in any one parameterized path for the foreign table. But in reality, the parameterized-path machinery forces all join clauses that are "movable to" the foreign table to be evaluated at that node; including clauses that we might not consider safe to send across. Such cases would result in an Assert failure in an assert-enabled build, and otherwise in sending an unsafe clause to the foreign server, which might result in errors or silently-wrong answers. A lesser problem was that the cost/rowcount estimates generated for the parameterized path failed to account for any additional join quals that get assigned to the scan. To fix, rewrite postgresGetForeignPaths so that it correctly collects all the movable quals for any one outer relation when generating parameterized paths; we'll now generate just one path per outer relation not one per join qual. Also fix bogus assumptions in postgresGetForeignPlan and estimate_path_cost_size that only safe-to-send join quals will be presented. Based on complaint from Etsuro Fujita that the path costs were being miscalculated, though this is significantly different from his proposed patch.
-
- Mar 05, 2014
-
-
Robert Haas authored
Commit 6f37c080 removed whitespace from the SQL file but not the expected-output file, and commit 7e8db2dc changed the error message without updating the expected outputs.
-
Bruce Momjian authored
-
Peter Eisentraut authored
-
- Mar 04, 2014
-
-
Andrew Dunstan authored
This forces an input field containing the quoted null string to be returned as a NULL. Without this option, only unquoted null strings behave this way. This helps where some CSV producers insist on quoting every field, whether or not it is needed. The option takes a list of fields, and only applies to those columns. There is an equivalent column-level option added to file_fdw. Ian Barwick, with some tweaking by Andrew Dunstan, reviewed by Payal Singh.
-