Re: Sort functions with specialized comparators

2024-09-08 Thread Stepan Neretin
bench) What do you think is the format in which to make benchmarks for my patches? Best regards, Stepan Neretin.

Re: Sort functions with specialized comparators

2024-09-08 Thread Stepan Neretin
Hi! I rebase, clean and some refactor my patches. Best regards, Stepan Neretin. From f88cbb80e478d5ac3f23945b4ba0ee881f0d9cd4 Mon Sep 17 00:00:00 2001 From: "Andrey M. Borodin" Date: Sun, 8 Sep 2024 15:43:39 +0700 Subject: [PATCH v2 01/10] Use specialized sort facilities --- contri

Re: SPI_connect, SPI_connect_ext return type

2024-09-07 Thread Stepan Neretin
> So if we tell extension authors they don't need to check the result, it's unlikely > that that will cause any new code they write to get used with PG > versions where it would be wrong. Yes, I concur. > This combines portions of Stepan's > two patches with some additional work (mostly, that he'd

Supporting pg freeze in pg_dump, restore.

2024-08-29 Thread Stepan Neretin
-copy-freeze/ Best regards, Stepan Neretin.

Re: SPI_connect, SPI_connect_ext return type

2024-08-10 Thread Stepan Neretin
ks everywhere (at least in the documentation). What do you think about the attached patch? Best Regards, Stepan Neretin. From 4c8d6d9ae6f8843bc6d1ad203d629df09657b039 Mon Sep 17 00:00:00 2001 From: Stepan Neretin Date: Sat, 10 Aug 2024 21:30:37 +0300 Subject: [PATCH v1] Fix SPI Documentation - Sta

Re: SPI_connect, SPI_connect_ext return type

2024-08-10 Thread Stepan Neretin
value of these functions is checked, and in some not? Can I add checks everywhere? Best Regards, Stepan Neretin.

Re: Sort functions with specialized comparators

2024-07-15 Thread Stepan Neretin
On Tue, Jul 16, 2024 at 1:47 AM Andrey M. Borodin wrote: > > > > On 15 Jul 2024, at 12:52, Stepan Neretin wrote: > > > > > > I run benchmark with my patches: > > ./pgbench -c 10 -j2 -t1000 -d postgres > > > > pgbench (18devel) > > starting v

Re: Patch bug: Fix jsonpath .* on Arrays

2024-07-15 Thread Stepan Neretin
ions be grouped closer to the existing tests rather than added at > > the end of the file? > > I’ve moved them closer to other tests for unwrapping behavior in the > attached updated and rebased v3 patch. > > Best, > > David > > > Hi! Looks good to me now! Please, register a patch in CF. Best regards, Stepan Neretin.

Re: Sort functions with specialized comparators

2024-07-15 Thread Stepan Neretin
On Mon, Jul 15, 2024 at 4:52 PM Stepan Neretin wrote: > > > On Mon, Jul 15, 2024 at 12:23 PM Антуан Виолин > wrote: > >> Hello all. >>> >>> I have decided to explore more areas in which I can optimize and have >>> added >>> two new bench

Re: Sort functions with specialized comparators

2024-07-15 Thread Stepan Neretin
t;worst case" test, sorting the array in ascending order when it > is initially descending > > Best, regards, Antoine Violin > > postgres=# >> > > On Mon, Jul 15, 2024 at 10:32 AM Stepan Neretin wrote: > >> >> >> On Sat, Jun 8, 2024 at

Re: Extension for PostgreSQL cast jsonb to hstore WIP

2024-07-15 Thread Stepan Neretin
On Mon, Jul 15, 2024 at 12:44 PM Антуан Виолин wrote: > On 2024-04-03 Wn 04:21, Andrew Dunstan > >> I don't think a cast that doesn't cater for all the forms json can take >> is going to work very well. At the very least you would need to error out >> in cases you didn't want to cover, and have t

Re: gamma() and lgamma() functions

2024-07-01 Thread Stepan Neretin
On Mon, Jul 1, 2024 at 5:33 PM Dean Rasheed wrote: > Attached is a patch adding support for the gamma and log-gamma > functions. See, for example: > > https://en.wikipedia.org/wiki/Gamma_function > > I think these are very useful general-purpose mathematical functions. > They're part of C99, and

Re: gamma() and lgamma() functions

2024-07-01 Thread Stepan Neretin
might need further discussion. > > Regards, > Dean > Hi! The patch file seems broken. git apply gamma-and-lgamma.patch error: git apply: bad git-diff — exptec /dev/null in line 2 Best regards, Stepan Neretin.

Re: stale comments about fastgetattr and heap_getattr

2024-06-27 Thread Stepan Neretin
Hi! Looks good to me. Please, register it in CF. Best regards, Stepan Neretin. On Fri, Jun 28, 2024 at 10:05 AM Junwang Zhao wrote: > fastgetattr and heap_getattr are converted to inline functions > in e27f4ee0a701, while some comments still referring them as macros. > > -- > Re

Re: Patch bug: Fix jsonpath .* on Arrays

2024-06-26 Thread Stepan Neretin
ror-raising query that passes the silent arg, which would also suppress > the error. > > Added a variant where the silent param suppresses the error, too. > > V2 attached and the PR updated: > > https://github.com/theory/postgres/pull/4/files > > Best, > > David > > > > HI! Now it looks good for me. Best regards, Stepan Neretin.

Re: thread-safety: gmtime_r(), localtime_r()

2024-06-26 Thread Stepan Neretin
; get at the Windows-style *_s() functions by supplying some additional > options or defines. But we might as well just use the POSIX ones.) > > Hi! Looks good to me. But why you don`t change localtime function at all places? For example: src/bin/pg_controldata/pg_controldata.c src/bin/pg_dump/pg_backup_archiver.c src/bin/initdb/findtimezone.c Best regards, Stepan Neretin.

Re: sql/json miscellaneous issue

2024-06-24 Thread Stepan Neretin
ge difference in behavior in these two queries, it seems to me that although it returns a string by default, for the boolean operator it is necessary to return true or false SELECT * FROM JSON_value (jsonb '1', '$ == "1"' returning jsonb); json_value -------- (1 row) SELECT * FROM JSON_value (jsonb 'null', '$ == "1"' returning jsonb); json_value false (1 row) Best regards, Stepan Neretin.

Re: strange context message in spi.c?

2024-06-24 Thread Stepan Neretin
Hi! Looks good to me! Best regards, Stepan Neretin.

Re: New function normal_rand_array function to contrib/tablefunc.

2024-06-24 Thread Stepan Neretin
It looks useful, for example, it can be used in sorting tests to make them more interesting. I just have one question. Why are you using SRF_IS_FIRST CALL and not _PG_init? Best regards, Stepan Neretin.

Re: Sort functions with specialized comparators

2024-06-10 Thread Stepan Neretin
On Sat, Jun 8, 2024 at 1:50 AM Stepan Neretin wrote: > Hello all. > > I am interested in the proposed patch and would like to propose some > additional changes that would complement it. My changes would introduce > similar optimizations when working with a list of int

Re: Sort functions with specialized comparators

2024-06-07 Thread Stepan Neretin
Time taken by list_sort: 118168506 ns, Time taken by list_int_sort: 80523373 ns, Percentage difference: 31.86% (1 row) What do you think about these changes? Best regards, Stepan Neretin. On Fri, Jun 7, 2024 at 11:08 PM Andrey M. Borodin wrote: > Hi! > > In a thread abou