pgsql: Don't add bailout adjustment for non-strict deserialize calls.

2021-01-28 Thread Andrew Gierth
Don't add bailout adjustment for non-strict deserialize calls. When building aggregate expression steps, strict checks need a bailout jump for when a null value is encountered, so there is a list of steps that require later adjustment. Adding entries to that list for steps that aren't actually str

pgsql: Don't add bailout adjustment for non-strict deserialize calls.

2021-01-28 Thread Andrew Gierth
Don't add bailout adjustment for non-strict deserialize calls. When building aggregate expression steps, strict checks need a bailout jump for when a null value is encountered, so there is a list of steps that require later adjustment. Adding entries to that list for steps that aren't actually str

pgsql: Don't add bailout adjustment for non-strict deserialize calls.

2021-01-28 Thread Andrew Gierth
Don't add bailout adjustment for non-strict deserialize calls. When building aggregate expression steps, strict checks need a bailout jump for when a null value is encountered, so there is a list of steps that require later adjustment. Adding entries to that list for steps that aren't actually str

pgsql: Don't add bailout adjustment for non-strict deserialize calls.

2021-01-28 Thread Andrew Gierth
Don't add bailout adjustment for non-strict deserialize calls. When building aggregate expression steps, strict checks need a bailout jump for when a null value is encountered, so there is a list of steps that require later adjustment. Adding entries to that list for steps that aren't actually str

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: Properly check index mark/restore in ExecSupportsMarkRestore.

2020-11-24 Thread Andrew Gierth
Properly check index mark/restore in ExecSupportsMarkRestore. Previously this code assumed that all IndexScan nodes supported mark/restore, which is not true since it depends on optional index AM support functions. This could lead to errors about missing support functions in rare edge cases of mer

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: Fix error case for CREATE ROLE ... IN ROLE.

2020-04-24 Thread Andrew Gierth
Fix error case for CREATE ROLE ... IN ROLE. CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messag

pgsql: Fix error case for CREATE ROLE ... IN ROLE.

2020-04-24 Thread Andrew Gierth
Fix error case for CREATE ROLE ... IN ROLE. CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messag

pgsql: Fix error case for CREATE ROLE ... IN ROLE.

2020-04-24 Thread Andrew Gierth
Fix error case for CREATE ROLE ... IN ROLE. CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messag

pgsql: Fix error case for CREATE ROLE ... IN ROLE.

2020-04-24 Thread Andrew Gierth
Fix error case for CREATE ROLE ... IN ROLE. CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messag

pgsql: Fix error case for CREATE ROLE ... IN ROLE.

2020-04-24 Thread Andrew Gierth
Fix error case for CREATE ROLE ... IN ROLE. CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messag

pgsql: Fix error case for CREATE ROLE ... IN ROLE.

2020-04-24 Thread Andrew Gierth
Fix error case for CREATE ROLE ... IN ROLE. CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messag

pgsql: doc: restore intentional typo

2020-04-11 Thread Andrew Gierth
doc: restore intentional typo Commit ac8623760 "fixed" a typo in an example of what would happen in the event of a typo. Restore the original typo and add a comment about its intentionality. Backpatch to 12 where the error was introduced. Per report from irc user Nicolás Alvarez. Branch -- m

pgsql: doc: restore intentional typo

2020-04-11 Thread Andrew Gierth
doc: restore intentional typo Commit ac8623760 "fixed" a typo in an example of what would happen in the event of a typo. Restore the original typo and add a comment about its intentionality. Backpatch to 12 where the error was introduced. Per report from irc user Nicolás Alvarez. Branch -- R

pgsql: Force tuple conversion when the source has missing attributes.

2020-02-05 Thread Andrew Gierth
Force tuple conversion when the source has missing attributes. Tuple conversion incorrectly concluded that no conversion was needed as long as all the attributes lined up. But if the source tuple has a missing attribute (from addition of a column with default), then the destination tupdesc might n

pgsql: Force tuple conversion when the source has missing attributes.

2020-02-05 Thread Andrew Gierth
Force tuple conversion when the source has missing attributes. Tuple conversion incorrectly concluded that no conversion was needed as long as all the attributes lined up. But if the source tuple has a missing attribute (from addition of a column with default), then the destination tupdesc might n

pgsql: Force tuple conversion when the source has missing attributes.

2020-02-05 Thread Andrew Gierth
Force tuple conversion when the source has missing attributes. Tuple conversion incorrectly concluded that no conversion was needed as long as all the attributes lined up. But if the source tuple has a missing attribute (from addition of a column with default), then the destination tupdesc might n

pgsql: Optimizations for integer to decimal output.

2020-02-01 Thread Andrew Gierth
Optimizations for integer to decimal output. Using a lookup table of digit pairs reduces the number of divisions needed, and calculating the length upfront saves some work; these ideas are taken from the code previously committed for floats. David Fetter, reviewed by Kyotaro Horiguchi, Tels, and

Re: pgsql: Move interrupt-handling code into subroutines.

2019-12-17 Thread Andrew Gierth
> "Robert" == Robert Haas writes: Robert> Move interrupt-handling code into subroutines. This is eliciting compiler warnings from gcc, which apparently doesn't count "static void foo();" as being a prototype (quite reasonably, since it's not). Needs this fix (in autovacuum.c and checkpoint

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

Re: pgsql: Make the order of the header file includes consistent in non-bac

2019-10-25 Thread Andrew Gierth
> "Amit" == Amit Kapila writes: Amit> BTW, prairiedog is also show similar failure and both seems to Amit> have similar OS except for versions. Be aware that prairiedog and locust (unlike the rest of the buildfarm) have compilers whose "bool" type is not 1 byte long; PG can't use that, so

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Teach pg_stat_statements not to ignore FOR UPDATE clauses

2019-07-14 Thread Andrew Gierth
Teach pg_stat_statements not to ignore FOR UPDATE clauses Performance of a SELECT FOR UPDATE may be quite distinct from the non-UPDATE version of the query, so treat all of the FOR UPDATE clause as being significant for distinguishing queries. Andrew Gierth and Vik Fearing, reviewed by Sergei

pgsql: Repair logic for reordering grouping sets optimization.

2019-06-30 Thread Andrew Gierth
Repair logic for reordering grouping sets optimization. The logic in reorder_grouping_sets to order grouping set elements to match a pre-specified sort ordering was defective, resulting in unnecessary sort nodes (though the query output would still be correct). Repair, simplifying the code a littl

pgsql: Repair logic for reordering grouping sets optimization.

2019-06-30 Thread Andrew Gierth
Repair logic for reordering grouping sets optimization. The logic in reorder_grouping_sets to order grouping set elements to match a pre-specified sort ordering was defective, resulting in unnecessary sort nodes (though the query output would still be correct). Repair, simplifying the code a littl

pgsql: Repair logic for reordering grouping sets optimization.

2019-06-30 Thread Andrew Gierth
Repair logic for reordering grouping sets optimization. The logic in reorder_grouping_sets to order grouping set elements to match a pre-specified sort ordering was defective, resulting in unnecessary sort nodes (though the query output would still be correct). Repair, simplifying the code a littl

pgsql: Repair logic for reordering grouping sets optimization.

2019-06-30 Thread Andrew Gierth
Repair logic for reordering grouping sets optimization. The logic in reorder_grouping_sets to order grouping set elements to match a pre-specified sort ordering was defective, resulting in unnecessary sort nodes (though the query output would still be correct). Repair, simplifying the code a littl

pgsql: Repair logic for reordering grouping sets optimization.

2019-06-30 Thread Andrew Gierth
Repair logic for reordering grouping sets optimization. The logic in reorder_grouping_sets to order grouping set elements to match a pre-specified sort ordering was defective, resulting in unnecessary sort nodes (though the query output would still be correct). Repair, simplifying the code a littl

pgsql: Prefer timezone name "UTC" over alternative spellings.

2019-06-15 Thread Andrew Gierth
Prefer timezone name "UTC" over alternative spellings. tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate zone with its own abbreviation. Unfortunately, our code for choosing a timezone in initdb has an arbitrary preference for names earlier in the alphabet, and so it would choo

pgsql: Prefer timezone name "UTC" over alternative spellings.

2019-06-15 Thread Andrew Gierth
Prefer timezone name "UTC" over alternative spellings. tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate zone with its own abbreviation. Unfortunately, our code for choosing a timezone in initdb has an arbitrary preference for names earlier in the alphabet, and so it would choo

pgsql: Prefer timezone name "UTC" over alternative spellings.

2019-06-15 Thread Andrew Gierth
Prefer timezone name "UTC" over alternative spellings. tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate zone with its own abbreviation. Unfortunately, our code for choosing a timezone in initdb has an arbitrary preference for names earlier in the alphabet, and so it would choo

pgsql: Prefer timezone name "UTC" over alternative spellings.

2019-06-15 Thread Andrew Gierth
Prefer timezone name "UTC" over alternative spellings. tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate zone with its own abbreviation. Unfortunately, our code for choosing a timezone in initdb has an arbitrary preference for names earlier in the alphabet, and so it would choo

pgsql: Prefer timezone name "UTC" over alternative spellings.

2019-06-15 Thread Andrew Gierth
Prefer timezone name "UTC" over alternative spellings. tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate zone with its own abbreviation. Unfortunately, our code for choosing a timezone in initdb has an arbitrary preference for names earlier in the alphabet, and so it would choo

pgsql: Prefer timezone name "UTC" over alternative spellings.

2019-06-15 Thread Andrew Gierth
Prefer timezone name "UTC" over alternative spellings. tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate zone with its own abbreviation. Unfortunately, our code for choosing a timezone in initdb has an arbitrary preference for names earlier in the alphabet, and so it would choo

pgsql: Fix array size allocation for HashAggregate hash keys.

2019-05-23 Thread Andrew Gierth
Fix array size allocation for HashAggregate hash keys. When there were duplicate columns in the hash key list, the array sizes could be miscomputed, resulting in access off the end of the array. Adjust the computation to ensure the array is always large enough. (I considered whether the duplicate

pgsql: Fix array size allocation for HashAggregate hash keys.

2019-05-23 Thread Andrew Gierth
Fix array size allocation for HashAggregate hash keys. When there were duplicate columns in the hash key list, the array sizes could be miscomputed, resulting in access off the end of the array. Adjust the computation to ensure the array is always large enough. (I considered whether the duplicate

pgsql: Fix array size allocation for HashAggregate hash keys.

2019-05-23 Thread Andrew Gierth
Fix array size allocation for HashAggregate hash keys. When there were duplicate columns in the hash key list, the array sizes could be miscomputed, resulting in access off the end of the array. Adjust the computation to ensure the array is always large enough. (I considered whether the duplicate

pgsql: Fix editing error in floating-point docs.

2019-05-10 Thread Andrew Gierth
Fix editing error in floating-point docs. My fault; the error was introduced in the Ryu patch. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b721e201a0bcf0f9e1795c295e134e47d698e80c Modified Files -- doc/src/sgml/datatype.sgml | 4 ++-- 1 file changed,

Re: pgsql: docs: fist draft version of the PG 12 release notes

2019-05-07 Thread Andrew Gierth
> "Bruce" == Bruce Momjian writes: Bruce> docs: fist draft version of the PG 12 release notes Bruce> Still needs text markup, links, word wrap, and indenting. The floating-point output change probably needs to be called out as a compatibility issue, not just a performance enhancement. --

pgsql: Implement OR REPLACE option for CREATE AGGREGATE.

2019-03-18 Thread Andrew Gierth
Implement OR REPLACE option for CREATE AGGREGATE. Aggregates have acquired a dozen or so optional attributes in recent years for things like parallel query and moving-aggregate mode; the lack of an OR REPLACE option to add or change these for an existing agg makes extension upgrades gratuitously h

pgsql: Use an unsigned char for bool if we don't use the native bool.

2019-02-20 Thread Andrew Gierth
Use an unsigned char for bool if we don't use the native bool. On (rare) platforms where sizeof(bool) > 1, we need to use our own bool, but imported c99 code (such as Ryu) may want to use bool values as array subscripts, which elicits warnings if bool is defined as char. Using unsigned char instea

pgsql: Remove float8-small-is-zero regression test variant.

2019-02-16 Thread Andrew Gierth
Remove float8-small-is-zero regression test variant. Since this was also the variant used as an example in the docs, update the docs to use float4-misrounded-input as an example instead, since that is now the only remaining variant file. Branch -- master Details --- https://git.postgresq

pgsql: Fix previous MinGW fix.

2019-02-16 Thread Andrew Gierth
Fix previous MinGW fix. Definitions required for MinGW need to be outside #if _MSC_VER. Oops. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/79730e2a9bb1ce7837feddd16208ff2d9e490118 Modified Files -- src/include/port/win32_port.h | 10 +- 1 file

pgsql: Cygwin and Mingw floating-point fixes.

2019-02-15 Thread Andrew Gierth
Cygwin and Mingw floating-point fixes. Deal with silent-underflow errors in float4 for cygwin and mingw by using our strtof() wrapper; deal with misrounding errors by adding them to the resultmap. Some slight reorganization of declarations was done to avoid duplicating material between cygwin.h an

Re: pgsql: Change floating-point output format for improved performance.

2019-02-13 Thread Andrew Gierth
> "Andrew" == Andrew Dunstan writes: >>> Cross-version upgrade is the big problem; I have no real idea how to >>> make that test work short of adding another GUC; revert? >> Andrew Dunstan might be able to help, although I'm not immediately >> sure how... Andrew> Me either. I can, of c

pgsql: Remove a stray subnormal value from float tests.

2019-02-13 Thread Andrew Gierth
Remove a stray subnormal value from float tests. We don't care to assume that input of subnormal float values works, but a stray subnormal value from the upstream Ryu regression test had been left in the test data by mistake. Remove it. Per buildfarm member fulmar. Branch -- master Details

pgsql: More float test and portability fixes.

2019-02-13 Thread Andrew Gierth
More float test and portability fixes. Avoid assuming exact results in tstypes test; some platforms vary. (per buildfarm members eulachon, danio, lapwing) Avoid dubious usage (inherited from upstream) of bool parameters to copy_special_str, to see if this fixes the mac/ppc failures (per buildfarm

Re: pgsql: Change floating-point output format for improved performance.

2019-02-13 Thread Andrew Gierth
>>>>> "Andrew" == Andrew Gierth writes: Fallout so far: Cygwin claims to have strtof, but it silently underflows to zero and misrounds input. Could be fixable with a variant output file? ICC seems to be miscompiling something, that'll need investigation. s

pgsql: Fix an overlooked UINT32_MAX.

2019-02-13 Thread Andrew Gierth
Fix an overlooked UINT32_MAX. Replace with PG_UINT32_MAX. Per buildfarm members dory and woodlouse. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/754ca99314e9e1debe855b0462869ef6e58b7e7a Modified Files -- src/common/f2s.c | 2 +- 1 file changed, 1 inse

Re: pgsql: Change floating-point output format for improved performance.

2019-02-13 Thread Andrew Gierth
Already aware of the windows breakage, will fix in a sec. -- Andrew (irc:RhodiumToad)

pgsql: Change floating-point output format for improved performance.

2019-02-13 Thread Andrew Gierth
Change floating-point output format for improved performance. Previously, floating-point output was done by rounding to a specific decimal precision; by default, to 6 or 15 decimal digits (losing information) or as requested using extra_float_digits. Drivers that wanted exact float values, and app

pgsql: Use strtof() and not strtod() for float4 input.

2019-02-13 Thread Andrew Gierth
Use strtof() and not strtod() for float4 input. Using strtod() creates a double-rounding problem; the input decimal value is first rounded to the nearest double; rounding that to the nearest float may then give an incorrect result. An example is that 7.038531e-26 when input via strtod and then ro

pgsql: Move port-specific parts of with_temp_install to port makefile.

2019-02-04 Thread Andrew Gierth
Move port-specific parts of with_temp_install to port makefile. Rather than define ld_library_path_ver with a big nested $(if), just put the overriding values in the makefiles for the relevant ports. Also add a variable for port makefiles to append their own stuff to with_temp_install, and use it

pgsql: Move port-specific parts of with_temp_install to port makefile.

2019-02-04 Thread Andrew Gierth
Move port-specific parts of with_temp_install to port makefile. Rather than define ld_library_path_ver with a big nested $(if), just put the overriding values in the makefiles for the relevant ports. Also add a variable for port makefiles to append their own stuff to with_temp_install, and use it

pgsql: Move port-specific parts of with_temp_install to port makefile.

2019-02-04 Thread Andrew Gierth
Move port-specific parts of with_temp_install to port makefile. Rather than define ld_library_path_ver with a big nested $(if), just put the overriding values in the makefiles for the relevant ports. Also add a variable for port makefiles to append their own stuff to with_temp_install, and use it

pgsql: Move port-specific parts of with_temp_install to port makefile.

2019-02-04 Thread Andrew Gierth
Move port-specific parts of with_temp_install to port makefile. Rather than define ld_library_path_ver with a big nested $(if), just put the overriding values in the makefiles for the relevant ports. Also add a variable for port makefiles to append their own stuff to with_temp_install, and use it

pgsql: Move port-specific parts of with_temp_install to port makefile.

2019-02-04 Thread Andrew Gierth
Move port-specific parts of with_temp_install to port makefile. Rather than define ld_library_path_ver with a big nested $(if), just put the overriding values in the makefiles for the relevant ports. Also add a variable for port makefiles to append their own stuff to with_temp_install, and use it

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Andrew Gierth
> "Amit" == Amit Kapila writes: Amit> Yes, so this could be the cause of the problem. I think we need Amit> to change the tests added by the patch such that they don't rely Amit> on vacuum to remove dead-row versions? Do you or anybody else see Amit> any better way to fix this? Do you ju

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Andrew Gierth
> "Amit" == Amit Kapila writes: Amit> One possibility is that autovacuum has triggered to perform Amit> truncation of some other relation (remove pages at the end) which Amit> doesn't allow the FSM test to remove the rows/perform truncation Amit> and thus let to the failure. Can there be

pgsql: Postpone aggregate checks until after collation is assigned.

2019-01-16 Thread Andrew Gierth
Postpone aggregate checks until after collation is assigned. Previously, parseCheckAggregates was run before assign_query_collations, but this causes problems if any expression has already had a collation assigned by some transform function (e.g. transformCaseExpr) before parseCheckAggregates runs

pgsql: Postpone aggregate checks until after collation is assigned.

2019-01-16 Thread Andrew Gierth
Postpone aggregate checks until after collation is assigned. Previously, parseCheckAggregates was run before assign_query_collations, but this causes problems if any expression has already had a collation assigned by some transform function (e.g. transformCaseExpr) before parseCheckAggregates runs

pgsql: Postpone aggregate checks until after collation is assigned.

2019-01-16 Thread Andrew Gierth
Postpone aggregate checks until after collation is assigned. Previously, parseCheckAggregates was run before assign_query_collations, but this causes problems if any expression has already had a collation assigned by some transform function (e.g. transformCaseExpr) before parseCheckAggregates runs

pgsql: Postpone aggregate checks until after collation is assigned.

2019-01-16 Thread Andrew Gierth
Postpone aggregate checks until after collation is assigned. Previously, parseCheckAggregates was run before assign_query_collations, but this causes problems if any expression has already had a collation assigned by some transform function (e.g. transformCaseExpr) before parseCheckAggregates runs

pgsql: Postpone aggregate checks until after collation is assigned.

2019-01-16 Thread Andrew Gierth
Postpone aggregate checks until after collation is assigned. Previously, parseCheckAggregates was run before assign_query_collations, but this causes problems if any expression has already had a collation assigned by some transform function (e.g. transformCaseExpr) before parseCheckAggregates runs

pgsql: Postpone aggregate checks until after collation is assigned.

2019-01-16 Thread Andrew Gierth
Postpone aggregate checks until after collation is assigned. Previously, parseCheckAggregates was run before assign_query_collations, but this causes problems if any expression has already had a collation assigned by some transform function (e.g. transformCaseExpr) before parseCheckAggregates runs

pgsql: doc: document that INFO messages always go to client.

2019-01-07 Thread Andrew Gierth
doc: document that INFO messages always go to client. In passing add a couple of links to the message severity table. Backpatch because it's always been this way. Author: Karl O. Pinc Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/3c4bdacc22fc9909768c4f45

pgsql: doc: document that INFO messages always go to client.

2019-01-07 Thread Andrew Gierth
doc: document that INFO messages always go to client. In passing add a couple of links to the message severity table. Backpatch because it's always been this way. Author: Karl O. Pinc Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/dd4143d06519344eaf35d7b2

pgsql: doc: document that INFO messages always go to client.

2019-01-07 Thread Andrew Gierth
doc: document that INFO messages always go to client. In passing add a couple of links to the message severity table. Backpatch because it's always been this way. Author: Karl O. Pinc Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/eef6476b2e21d0a127084240

pgsql: doc: document that INFO messages always go to client.

2019-01-07 Thread Andrew Gierth
doc: document that INFO messages always go to client. In passing add a couple of links to the message severity table. Backpatch because it's always been this way. Author: Karl O. Pinc Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bbce27c6dd6ddaed3adc5c14

pgsql: doc: document that INFO messages always go to client.

2019-01-07 Thread Andrew Gierth
doc: document that INFO messages always go to client. In passing add a couple of links to the message severity table. Backpatch because it's always been this way. Author: Karl O. Pinc Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/93fedda6f093ca0b47a27b91f3008af

pgsql: doc: document that INFO messages always go to client.

2019-01-07 Thread Andrew Gierth
doc: document that INFO messages always go to client. In passing add a couple of links to the message severity table. Backpatch because it's always been this way. Author: Karl O. Pinc Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7de8c719d3becdb4dcbefbae

pgsql: Fix hstore hash function for empty hstores upgraded from 8.4.

2018-11-24 Thread Andrew Gierth
Fix hstore hash function for empty hstores upgraded from 8.4. Hstore data generated on pg 8.4 and pg_upgraded to current versions remains in its original on-disk format unless modified. The same goes for values generated by the addon hstore-new module on pre-9.0 versions. (The hstoreUpgrade functi

pgsql: Fix hstore hash function for empty hstores upgraded from 8.4.

2018-11-24 Thread Andrew Gierth
Fix hstore hash function for empty hstores upgraded from 8.4. Hstore data generated on pg 8.4 and pg_upgraded to current versions remains in its original on-disk format unless modified. The same goes for values generated by the addon hstore-new module on pre-9.0 versions. (The hstoreUpgrade functi

pgsql: Fix hstore hash function for empty hstores upgraded from 8.4.

2018-11-24 Thread Andrew Gierth
Fix hstore hash function for empty hstores upgraded from 8.4. Hstore data generated on pg 8.4 and pg_upgraded to current versions remains in its original on-disk format unless modified. The same goes for values generated by the addon hstore-new module on pre-9.0 versions. (The hstoreUpgrade functi

pgsql: Fix hstore hash function for empty hstores upgraded from 8.4.

2018-11-24 Thread Andrew Gierth
Fix hstore hash function for empty hstores upgraded from 8.4. Hstore data generated on pg 8.4 and pg_upgraded to current versions remains in its original on-disk format unless modified. The same goes for values generated by the addon hstore-new module on pre-9.0 versions. (The hstoreUpgrade functi

pgsql: Fix hstore hash function for empty hstores upgraded from 8.4.

2018-11-24 Thread Andrew Gierth
Fix hstore hash function for empty hstores upgraded from 8.4. Hstore data generated on pg 8.4 and pg_upgraded to current versions remains in its original on-disk format unless modified. The same goes for values generated by the addon hstore-new module on pre-9.0 versions. (The hstoreUpgrade functi

pgsql: Fix hstore hash function for empty hstores upgraded from 8.4.

2018-11-24 Thread Andrew Gierth
Fix hstore hash function for empty hstores upgraded from 8.4. Hstore data generated on pg 8.4 and pg_upgraded to current versions remains in its original on-disk format unless modified. The same goes for values generated by the addon hstore-new module on pre-9.0 versions. (The hstoreUpgrade functi

pgsql: Avoid crashes in contrib/intarray gist__int_ops (bug #15518)

2018-11-24 Thread Andrew Gierth
Avoid crashes in contrib/intarray gist__int_ops (bug #15518) 1. Integer overflow in internal_size could result in memory corruption in decompression since a zero-length array would be allocated and then written to. This leads to crashes or corruption when traversing an index which has been populat

  1   2   >