- 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.
-
Alvaro Herrera authored
Author: Kyotaro HORIGUCHI Reviewed-by: Jaime Casanova
-
- Mar 03, 2014
-
-
Robert Haas authored
This feature, building on previous commits, allows the write-ahead log stream to be decoded into a series of logical changes; that is, inserts, updates, and deletes and the transactions which contain them. It is capable of handling decoding even across changes to the schema of the effected tables. The output format is controlled by a so-called "output plugin"; an example is included. To make use of this in a real replication system, the output plugin will need to be modified to produce output in the format appropriate to that system, and to perform filtering. Currently, information can be extracted from the logical decoding system only via SQL; future commits will add the ability to stream changes via walsender. Andres Freund, with review and other contributions from many other people, including Álvaro Herrera, Abhijit Menon-Sen, Peter Gheogegan, Kevin Grittner, Robert Haas, Heikki Linnakangas, Fujii Masao, Abhijit Menon-Sen, Michael Paquier, Simon Riggs, Craig Ringer, and Steve Singer.
-
Robert Haas authored
Michael Paquier, with slight comment changes by me
-
- Feb 28, 2014
-
-
Peter Eisentraut authored
Add NUM placeholder to -t option in help message. It got lost in 79cddb18. Author: Fabien COELHO <coelho@cri.ensmp.fr>
-
- Feb 27, 2014
-
-
Tom Lane authored
Testing convert_to(..., 'ISO-8859-1') fails if there isn't a conversion function available from the database encoding to ISO-8859-1. This has been broken since day one, but the breakage was hidden by pg_do_encoding_conversion's failure to complain, up till commit 49c817ea. Since the data being converted in this test is plain ASCII, no actual conversion need happen (and if it did, it would prove little about citext anyway). So that we still have some code coverage of the convert() family of functions, let's switch to using convert_from, with SQL_ASCII as the specified source encoding. Per buildfarm.
-
- Feb 23, 2014
-
-
Tom Lane authored
A large majority of the callers of pg_do_encoding_conversion were specifying the database encoding as either source or target of the conversion, meaning that we can use the less general functions pg_any_to_server/pg_server_to_any instead. The main advantage of using the latter functions is that they can make use of a cached conversion-function lookup in the common case that the other encoding is the current client_encoding. It's notationally cleaner too in most cases, not least because of the historical artifact that the latter functions use "char *" rather than "unsigned char *" in their APIs. Note that pg_any_to_server will apply an encoding verification step in some cases where pg_do_encoding_conversion would have just done nothing. This seems to me to be a good idea at most of these call sites, though it partially negates the performance benefit. Per discussion of bug #9210.
-
- Feb 21, 2014
-
-
Heikki Linnakangas authored
The length of the output buffer was calculated based on the size of the argument hstore. On a sizeof(int) == 4 platform and a huge argument, it could overflow, causing a too small buffer to be allocated. Refactor the function to use a StringInfo instead of pre-allocating the buffer. Makes it shorter and more readable, too.
-
- Feb 17, 2014
-
-
Tom Lane authored
Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun is not really a security issue. Nonetheless it seems prudent to forestall any risk by using strlcpy() and similar functions. Fixes by Peter Eisentraut and Jozef Mlich based on Coverity reports. In addition, fix a potential null-pointer-dereference crash in contrib/chkpass. The crypt(3) function is defined to return NULL on failure, but chkpass.c didn't check for that before using the result. The main practical case in which this could be an issue is if libc is configured to refuse to execute unapproved hashing algorithms (e.g., "FIPS mode"). This ideally should've been a separate commit, but since it touches code adjacent to one of the buffer overrun changes, I included it in this commit to avoid last-minute merge issues. This issue was reported by Honza Horak. Security: CVE-2014-0065 for buffer overruns, CVE-2014-0066 for crypt()
-
Noah Misch authored
Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly thereafter. Coverity identified the path_in() vulnerability; code inspection led to the rest. In passing, add check_stack_depth() to prevent stack overflow in related functions. Back-patch to 8.4 (all supported versions). The non-comment hstore changes touch code that did not exist in 8.4, so that part stops at 9.0. Noah Misch and Heikki Linnakangas, reviewed by Tom Lane. Security: CVE-2014-0064
-
- Feb 15, 2014
-
-
Tom Lane authored
We used to have externs for getopt() and its API variables scattered all over the place. Now that we find we're going to need to tweak the variable declarations for Cygwin, it seems like a good idea to have just one place to tweak. In this commit, the variables are declared "#ifndef HAVE_GETOPT_H". That may or may not work everywhere, but we'll soon find out. Andres Freund
-