pgsql: doc: add examples for array_length() and jsonb_array_length()

2022-07-08 Thread Bruce Momjian
doc: add examples for array_length() and jsonb_array_length() The examples show the output of array_length() and jsonb_array_length() for empty arrays. Discussion: https://postgr.es/m/cakfquwaobmruwdmlzlhdcfdjdx3wvfq7egaf0bpik_bfgg1...@mail.gmail.com Author: David G. Johnston Backpatch-throug

pgsql: doc: add examples for array_length() and jsonb_array_length()

2022-07-08 Thread Bruce Momjian
doc: add examples for array_length() and jsonb_array_length() The examples show the output of array_length() and jsonb_array_length() for empty arrays. Discussion: https://postgr.es/m/cakfquwaobmruwdmlzlhdcfdjdx3wvfq7egaf0bpik_bfgg1...@mail.gmail.com Author: David G. Johnston Backpatch-throug

pgsql: doc: add examples for array_length() and jsonb_array_length()

2022-07-08 Thread Bruce Momjian
doc: add examples for array_length() and jsonb_array_length() The examples show the output of array_length() and jsonb_array_length() for empty arrays. Discussion: https://postgr.es/m/cakfquwaobmruwdmlzlhdcfdjdx3wvfq7egaf0bpik_bfgg1...@mail.gmail.com Author: David G. Johnston Backpatch-throug

pgsql: doc: add examples for array_length() and jsonb_array_length()

2022-07-08 Thread Bruce Momjian
doc: add examples for array_length() and jsonb_array_length() The examples show the output of array_length() and jsonb_array_length() for empty arrays. Discussion: https://postgr.es/m/cakfquwaobmruwdmlzlhdcfdjdx3wvfq7egaf0bpik_bfgg1...@mail.gmail.com Author: David G. Johnston Backpatch-throug

pgsql: doc: add pg_prewarm example

2022-07-08 Thread Bruce Momjian
doc: add pg_prewarm example Discussion: https://postgr.es/m/20220618085541.ezxdaljlpo6x7msc@home-desktop Author: Dong Wook Lee Backpatch-through: 11 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/aa31b29375b9afbe1330d7726855645ff82a2e51 Modified Files -

pgsql: doc: add pg_prewarm example

2022-07-08 Thread Bruce Momjian
doc: add pg_prewarm example Discussion: https://postgr.es/m/20220618085541.ezxdaljlpo6x7msc@home-desktop Author: Dong Wook Lee Backpatch-through: 11 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0a1c5a6b966782e4f2de67a3613dae7c5880dd83 Modified Files --

pgsql: doc: add pg_prewarm example

2022-07-08 Thread Bruce Momjian
doc: add pg_prewarm example Discussion: https://postgr.es/m/20220618085541.ezxdaljlpo6x7msc@home-desktop Author: Dong Wook Lee Backpatch-through: 11 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/12f56b6a70ca06acd394f37a965e4814e8472373 Modified Files --

pgsql: doc: add pg_prewarm example

2022-07-08 Thread Bruce Momjian
doc: add pg_prewarm example Discussion: https://postgr.es/m/20220618085541.ezxdaljlpo6x7msc@home-desktop Author: Dong Wook Lee Backpatch-through: 11 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f02f0b8cea5dddfa8ff5e0e26d2ece2052c4f0fe Modified Files --

pgsql: doc: add pg_prewarm example

2022-07-08 Thread Bruce Momjian
doc: add pg_prewarm example Discussion: https://postgr.es/m/20220618085541.ezxdaljlpo6x7msc@home-desktop Author: Dong Wook Lee Backpatch-through: 11 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5df0f158a201988957a932064367bc55d592d4b2 Modified Files --

pgsql: doc: add pg_prewarm example

2022-07-08 Thread Bruce Momjian
doc: add pg_prewarm example Discussion: https://postgr.es/m/20220618085541.ezxdaljlpo6x7msc@home-desktop Author: Dong Wook Lee Backpatch-through: 11 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9d71664c88defe967ccdbf485c0216c0d5a301ee Modified Files --

pgsql: Use C99 designator in the rbtree sentinel definition

2022-07-08 Thread Alexander Korotkov
Use C99 designator in the rbtree sentinel definition This change should improve the code readability. Discussion: https://postgr.es/m/CAGRrpzYE8-7GCoaPjOiL9T_HY605MRax-2jgTtLq236uksZ1Sw%40mail.gmail.com Author: Steve Chavez, Alexander Korotkov Reviewed-by: Alexander Korotkov Branch -- maste

pgsql: Add missing inequality searches to rbtree

2022-07-08 Thread Alexander Korotkov
Add missing inequality searches to rbtree PostgreSQL contains the implementation of the red-black tree. The red-black tree is the ordered data structure, and one of its advantages is the ability to do inequality searches. This commit adds rbt_find_less() and rbt_find_great() functions implementi

pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u

2022-07-08 Thread Robert Haas
Preserve relfilenode of pg_largeobject and its index across pg_upgrade. Commit 9a974cbcba005256a19991203583a94b4f9a21a9 did this for user tables, but pg_upgrade treats pg_largeobject as a user table, and so needs the same treatment. Without this fix, if you rewrite the pg_largeobject table and the

pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u

2022-07-08 Thread Robert Haas
Preserve relfilenode of pg_largeobject and its index across pg_upgrade. Commit 9a974cbcba005256a19991203583a94b4f9a21a9 did this for user tables, but pg_upgrade treats pg_largeobject as a user table, and so needs the same treatment. Without this fix, if you rewrite the pg_largeobject table and the

pgsql: Overload index_form_tuple to allow the memory context to be supp

2022-07-08 Thread David Rowley
Overload index_form_tuple to allow the memory context to be supplied 40af10b57 changed things so we make use of a generation memory context for storing tuples to be sorted by tuplesort.c. That change does not play nicely with the changes made in 9f03ca915 (back in 2014). That commit changed things

pgsql: Overload index_form_tuple to allow the memory context to be supp

2022-07-08 Thread David Rowley
Overload index_form_tuple to allow the memory context to be supplied 40af10b57 changed things so we make use of a generation memory context for storing tuples to be sorted by tuplesort.c. That change does not play nicely with the changes made in 9f03ca915 (back in 2014). That commit changed things

pgsql: Remove size increase in ExprEvalStep caused by hashed saops

2022-07-08 Thread David Rowley
Remove size increase in ExprEvalStep caused by hashed saops 50e17ad28 increased the size of ExprEvalStep from 64 bytes up to 88 bytes. Lots of effort was spent during the development of the current expression evaluation code to make an instance of this struct as small as possible. Making this stru

pgsql: Remove size increase in ExprEvalStep caused by hashed saops

2022-07-08 Thread David Rowley
Remove size increase in ExprEvalStep caused by hashed saops 50e17ad28 increased the size of ExprEvalStep from 64 bytes up to 88 bytes. Lots of effort was spent during the development of the current expression evaluation code to make an instance of this struct as small as possible. Making this stru

pgsql: Simplify json lexing state

2022-07-08 Thread John Naylor
Simplify json lexing state Instead of updating the length as we go, use a const pointer to end of the input, which we know already at the start. This simplifies the coding and may improve performance slightly, but the real motivation for doing this is to make further changes in this area easier t

Re: pgsql: Only allow returning string types or bytea from json_serialize

2022-07-08 Thread Michael Paquier
On Fri, Jul 08, 2022 at 03:41:35PM +0900, Kyotaro Horiguchi wrote: > I noticed that this introcues the following error message. > > + errmsg("cannot use RETURNING type %s in JSON_SERIALIZE" > + > format_type_be(returning->typid)), > >

pgsql: Adjust node serialization tag of A_Expr for consistency

2022-07-08 Thread Peter Eisentraut
Adjust node serialization tag of A_Expr for consistency Changed from AEXPR to A_EXPR for consistency. Discussion: https://www.postgresql.org/message-id/2592455.1657140387%40sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bf1f4a364d6c72cc5c39a6d81d156

pgsql: Remove T_Join and T_Plan

2022-07-08 Thread Peter Eisentraut
Remove T_Join and T_Plan These are abstract node types that don't need to have a node tag defined. Discussion: https://www.postgresql.org/message-id/2592455.1657140387%40sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/251154bebe98ca5d3487ccbe0dceb7f4

pgsql: Reformat some more node comments

2022-07-08 Thread Peter Eisentraut
Reformat some more node comments Reformat some more comments in node field definitions to avoid long lines. Similar to 835d476fd21bcfb60b055941dee8c3d9559af14c, based on additional per-field annotations that will be required. Discussion: https://www.postgresql.org/message-id/c5906b07-220a-a3d4-