1. Andrew Dunstan
  2. pgdevel

Commits

Author Commit Message Date Builds
Heikki Linnakangas
Oops, forgot to "git add" last minute changes to regression test.
Branches
2 branches
Michael Meskes
ECPG: Fix offset to NULL/size indicator array. Patch by Boszormenyi Zoltan <zb@cybertec.at>
Branches
2 branches
Michael Meskes
ECPG: Simplify free_variable() Patch by Boszormenyi Zoltan <zb@cybertec.at>
Branches
2 branches
Michael Meskes
ECPG: Add EXEC SQL CLOSE C to the tests. Patch by Boszormenyi Zoltan <zb@cybertec.at>
Branches
2 branches
Michael Meskes
ECPG: Free the malloc()'ed variables in the test so it comes out clean on Valgrind runs. Patch by Boszormenyi Zoltan <zb@cybertec.at>
Branches
2 branches
Michael Meskes
ECPG: Make the preprocessor emit ';' if the variable type for a list of variables is varchar. This fixes this test case: int main(void) { exec sql begin declare section; varchar a[50], b[50]; exec sql end declare section; return 0; } Since varchars are internally turned into custom structs and the type name is emitted for these variable declarations, the preprocessed code previously had: struct varchar_1 { ... } a _,_ struct varchar_2 { ... } b ; The comma in the generated C file was a synta…
Branches
2 branches
Heikki Linnakangas
Handle domains over arrays like plain arrays in PL/python. Domains over arrays are now converted to/from python lists when passed as arguments or return values. Like regular arrays. This has some potential to break applications that rely on the old behavior that they are passed as strings, but in practice there probably aren't many such applications out there. Rodolfo Campero
Branches
2 branches
Jeff Davis
Add missing entry for session_preload_libraries in sample config. The omission was apparently an oversight in the original patch.
Branches
2 branches
Bruce Momjian
Change SET LOCAL/CONSTRAINTS/TRANSACTION and ABORT behavior Change SET LOCAL/CONSTRAINTS/TRANSACTION behavior outside of a transaction block from error (post-9.3) to warning. (Was nothing in <= 9.3.) Also change ABORT outside of a transaction block from notice to warning.
Branches
2 branches
Michael Meskes
More improvement to comment parsing in ecpg. ECPG is not supposed to allow and output nested comments in C. These comments are only allowed in the SQL parts and must not be written into the C file. Also the different handling of different comments is documented.
Branches
2 branches
Michael Meskes
Fix ecpg parsing of sizeof(). The last fix used the wrong non-terminal to define valid types.
Branches
2 branches
Jeff Davis
Lessen library-loading log level. Previously, messages were emitted at the LOG level every time a backend preloaded a library. That was acceptable (though unnecessary) for shared_preload_libraries; but it was excessive for local_preload_libraries and session_preload_libraries. Reduce to DEBUG1. Also, there was logic in the EXEC_BACKEND case to avoid repeated messages for shared_preload_libraries by demoting them to DEBUG2. DEBUG1…
Branches
2 branches
Tom Lane
Fix new and latent bugs with errno handling in secure_read/secure_write. These functions must be careful that they return the intended value of errno to their callers. There were several scenarios where this might not happen: 1. The recent SSL renegotiation patch added a hunk of code that would execute after setting errno. In the first place, it's doubtful that we should consider renegotiation to be successfully completed after a failure, and in the second, there's …
Branches
2 branches
Michael Meskes
Allow C array definitions to use sizeof(). When parsing C variable definitions ecpg should allow sizeof() operators as array dimensions.
Branches
2 branches
Michael Meskes
Distinguish between C and SQL mode for C-style comments. SQL standard asks for allowing nested comments, while C does not. Therefore the two comments, while mostly similar, have to be parsed seperately.
Branches
2 branches
Tom Lane
Defend against bad trigger definitions in contrib/lo's lo_manage() trigger. This function formerly crashed if called as a statement-level trigger, or if a column-name argument wasn't given. In passing, add the trigger name to all error messages from the function. (None of them are expected cases, so this shouldn't pose any compatibility risk.) Marc Cousin, reviewed by Sawada Masahiko
Branches
2 branches
Peter Eisentraut
PL/Tcl: Add event trigger support From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Branches
2 branches
Tom Lane
Fix array slicing of int2vector and oidvector values. The previous coding labeled expressions such as pg_index.indkey[1:3] as being of int2vector type; which is not right because the subscript bounds of such a result don't, in general, satisfy the restrictions of int2vector. To fix, implicitly promote the result of slicing int2vector to int2[], or oidvector to oid[]. This is similar to what we've done with domains over arrays, which is a good analog…
Branches
2 branches
Tom Lane
Ensure _dosmaperr() actually sets errno correctly. If logging is enabled, either ereport() or fprintf() might stomp on errno internally, causing this function to return the wrong result. That might only end in a misleading error report, but in any code that's examining errno to decide what to do next, the consequences could be far graver. This has been broken since the very first version of this file in 2006 ... it's a bit astonishing that we di…
Branches
2 branches
Peter Eisentraut
Fix thinko in SPI_execute_plan() calls Two call sites were apparently thinking that the last argument of SPI_execute_plan() is the number of query parameters, but it is actually the row limit. Change the calls to 0, since we don't care about the limit there. The previous code didn't break anything, but it was still wrong.
Branches
2 branches
Peter Eisentraut
Avoid potential buffer overflow crash A pointer to a C string was treated as a pointer to a "name" datum and passed to SPI_execute_plan(). This pointer would then end up being passed through datumCopy(), which would try to copy the entire 64 bytes of name data, thus running past the end of the C string. Fix by converting the string to a proper name structure. Found by LLVM AddressSanitizer.
Branches
2 branches
Tom Lane
Flatten join alias Vars before pulling up targetlist items from a subquery. pullup_replace_vars()'s decisions about whether a pulled-up replacement expression needs to be wrapped in a PlaceHolderVar depend on the assumption that what looks like a Var behaves like a Var. However, if the Var is a join alias reference, later flattening of join aliases might replace the Var with something that's not a Var at all, and should have been wrapped. To fix, do a forcible pass of f…
Branches
2 branches
Tom Lane
Fix quoting in help messages in uuid-ossp extension scripts. The command we're telling people to type needs to include double-quoting around the unfortunately-chosen extension name. Twiddle the textual quoting so that it looks somewhat sane. Per gripe from roadrunner6.
Branches
2 branches
Heikki Linnakangas
Fix Hot-Standby initialization of clog and subtrans. These bugs can cause data loss on standbys started with hot_standby=on at the moment they start to accept read only queries, by marking committed transactions as uncommited. The likelihood of such corruptions is small unless the primary has a high transaction rate. 5a031a5556ff83b8a9646892715d7fef415b83c3 fixed bugs in HS's startup logic by maintaining less state until at least STANDBY_SNAPSHOT_P…
Branches
2 branches
Heikki Linnakangas
Avoid acquiring spinlock when checking if recovery has finished, for speed. RecoveryIsInProgress() can be called very frequently. During normal operation, it just checks a backend-local variable and returns quickly, but during hot standby, it checks a spinlock-protected shared variable. Those spinlock acquisitions can become a point of contention on a busy hot standby system. Replace the spinlock acquisition with a memory barrier. Per discussion with Andres Freund, Ants…
Branches
2 branches
Peter Eisentraut
Tweak streamutil.c further to avoid scan-build warning The previous change added a new scan-build warning about need_password assigned but not read.
Branches
2 branches
Tom Lane
Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. This patch adds the ability to write TABLE( function1(), function2(), ...) as a single FROM-clause entry. The result is the concatenation of the first row from each function, followed by the second row from each function, etc; with NULLs inserted if any function produces fewer rows than others. This is believed to be a much more useful behavior than what Postgres currently does with multiple SRF…
Branches
2 branches
Fujii Masao
Fix pg_isready to handle -d option properly. Previously, -d option for pg_isready was broken. When the name of the database was specified by -d option, pg_isready failed with an error. When the conninfo specified by -d option contained the setting of the host name but not Numeric IP address (i.e., hostaddr), pg_isready displayed wrong connection message. -d option could not handle a valid URI prefix at all. This commit fixes these bugs of pg…
Branches
2 branches
Heikki Linnakangas
More GIN refactoring. Split off the portion of ginInsertValue that inserts the tuple to current level into a separate function, ginPlaceToPage. ginInsertValue's charter is now to recurse up the tree to insert the downlink, when a page split is required. This is in preparation for a patch to change the way incomplete splits are handled, which will need to do these operations separately. And IMHO makes the code more rea…
Branches
2 branches
Heikki Linnakangas
Refactor the internal GIN B-tree interface for forming a downlink. This creates a new gin-btree callback function for creating a downlink for a page. Previously, ginxlog.c duplicated the logic used during normal operation.
Branches
2 branches
  1. Prev
  2. Next