Re: msys inet_pton strangeness

2024-09-28 Thread Alexander Lakhin
Hello Thomas and Andrew, 28.09.2024 23:52, Thomas Munro wrote: On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan wrote: We should have included ws2tcpip.h, which includes this: #define InetPtonA inet_pton WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR pStringBuf, PVOID pAddr); It'

Re: Add has_large_object_privilege function

2024-09-28 Thread Yugo Nagata
On Fri, 27 Sep 2024 11:44:25 +0100 Dagfinn Ilmari Mannsåker wrote: > Michael Paquier writes: > > > - New functions introduced during a development cycle should use OIDs in > > the range 8000-. See 98eab30b93d5, consisting of running > > ./unused_oids to get a random range. > > There's bee

Re: general purpose array_sort

2024-09-28 Thread David G. Johnston
On Sat, Sep 28, 2024 at 7:05 PM Junwang Zhao wrote: > On Sat, Sep 28, 2024 at 10:41 PM jian he > wrote: > > > > dir can have only two potential values, make it > > as a boolean would be more easier? > > you didn't mention information: "by default, it will sort by > > ascending order; the sort c

Re: general purpose array_sort

2024-09-28 Thread Junwang Zhao
On Sat, Sep 28, 2024 at 10:41 PM jian he wrote: > > On Sat, Sep 28, 2024 at 7:52 PM Junwang Zhao wrote: > > > > PFA v2, use COLLATE keyword to supply the collation suggested by > > Andreas offlist. > > > this is better. otherwise we need extra care to handle case like: > SELECT array_sort('{1,3,5

Re: First draft of PG 17 release notes

2024-09-28 Thread Bruce Momjian
On Thu, Sep 26, 2024 at 03:08:52PM +0530, Amit Kapila wrote: > On Sat, Sep 21, 2024 at 1:50 AM Bruce Momjian wrote: > > > > On Fri, Sep 20, 2024 at 04:05:11PM -0400, Tom Lane wrote: > > > Bruce Momjian writes: > > > > Patch applied to PG 17. > > > > > > I don't see a push? > > > > Push was delaye

Re: First draft of PG 17 release notes

2024-09-28 Thread Bruce Momjian
On Thu, Sep 26, 2024 at 02:19:21PM +0900, Yugo Nagata wrote: > On Thu, 9 May 2024 00:03:50 -0400 > Bruce Momjian wrote: > > > I have committed the first draft of the PG 17 release notes; you can > > see the results here: > > I propose to improve the following description in "Migration to Versio

Re: [PATCH] Add native windows on arm64 support

2024-09-28 Thread Thomas Munro
On Tue, Feb 13, 2024 at 10:01 AM Dave Cramer wrote: > > postgres.exe!dsa_free(dsa_area * area, unsigned __int64 dp) Line 869 C > postgres.exe!resize(dshash_table * hash_table, unsigned __int64 > new_size_log2) Line 879 C > postgres.exe!dshash_find_or_insert(dshash_table * hash_table, const vo

Re: pg_verifybackup: TAR format backup verification

2024-09-28 Thread Tom Lane
The 32-bit buildfarm animals don't like this too much [1]: astreamer_verify.c: In function 'member_verify_checksum': astreamer_verify.c:297:68: error: format '%zu' expects argument of type 'size_t', but argument 6 has type 'uint64' {aka 'long long unsigned int'} [-Werror=format=] 297 |

Re: Vacuum statistics

2024-09-28 Thread Alena Rybakina
Hi! Thank you for your interesting for this patch! I took a very brief look at this and was wondering if it was worth having a way to make the per-table vacuum statistics opt-in (like a table storage parameter) in order to decrease the shared memory footprint of storing the stats. I'm not sure h

ORDER BY operator index scans and filtering

2024-09-28 Thread Andrew Kane
Hi, Currently, index scans that order by an operator (for instance, `location <-> POINT(0, 0)`) and have a filter for the same expression (`location <-> POINT(0, 0) < 2`) can end up scanning much more of the index than is necessary. Here's a complete example: CREATE TABLE stores (location point)

Re: msys inet_pton strangeness

2024-09-28 Thread Thomas Munro
On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan wrote: > We should have included ws2tcpip.h, which includes this: > > #define InetPtonA inet_pton > WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR pStringBuf, PVOID > pAddr); > > It's conditioned on (_WIN32_WINNT >= 0x0600), but that sho

Re: msys inet_pton strangeness

2024-09-28 Thread Tom Lane
Andrew Dunstan writes: > We should have included ws2tcpip.h, which includes this: > #define InetPtonA inet_pton > WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR pStringBuf, > PVOID pAddr); > It's conditioned on (_WIN32_WINNT >= 0x0600), but that should be true. > So I'm st

Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

2024-09-28 Thread Tom Lane
I wrote: > It looks like if we did want to suppress that, the right fix is to > make gram.y track statement start locations more honestly, as in > 0002 attached (0001 is the same as before). I did a little bit of further work on this: * I ran some performance checks and convinced myself that inde

Re: msys inet_pton strangeness

2024-09-28 Thread Andrew Dunstan
On 2024-09-28 Sa 11:49 AM, Tom Lane wrote: Andrew Dunstan writes: It's complaining like this: C:/tools/xmsys64/home/pgrunner/bf/root/REL_15_STABLE/pgsql/src/interfaces/libpq/fe-secure-common.c:219:21: error: implicit declaration of function 'inet_pton'; did you mean 'inet_aton'? [-Wimplicit-

Re: msys inet_pton strangeness

2024-09-28 Thread Tom Lane
Andrew Dunstan writes: > It's complaining like this: > C:/tools/xmsys64/home/pgrunner/bf/root/REL_15_STABLE/pgsql/src/interfaces/libpq/fe-secure-common.c:219:21: > error: implicit declaration of function 'inet_pton'; did you mean > 'inet_aton'? [-Wimplicit-function-declaration] >219 |

Re: general purpose array_sort

2024-09-28 Thread jian he
On Sat, Sep 28, 2024 at 7:52 PM Junwang Zhao wrote: > > PFA v2, use COLLATE keyword to supply the collation suggested by > Andreas offlist. > this is better. otherwise we need extra care to handle case like: SELECT array_sort('{1,3,5,2,4,6}'::int[] COLLATE "pg_c_utf8"); + + +

msys inet_pton strangeness

2024-09-28 Thread Andrew Dunstan
A week or so ago I upgraded the msys2 animal fairywren to the latest msys2, and ever since then the build has been failing for Release 15. It's complaining like this: ccache gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-form

Re: [PATCH] Add native windows on arm64 support

2024-09-28 Thread Andrew Dunstan
On 2024-09-24 Tu 2:31 PM, Dave Cramer wrote: On Tue, 13 Feb 2024 at 16:28, Dave Cramer wrote: On Tue, 13 Feb 2024 at 12:52, Andres Freund wrote: Hi, On 2024-02-13 12:49:33 -0500, Dave Cramer wrote: > > I think I might have been on to something - if my

Re: general purpose array_sort

2024-09-28 Thread Junwang Zhao
On Fri, Sep 27, 2024 at 9:15 PM Junwang Zhao wrote: > > Hi hackers, > > per David's suggestion, this patch implements general > purpose array sort. > > We can do the following with this patch: > > SELECT array_sort('{1.1,3.3,5.5,2.2,4.4,6.6}'::float8[], 'asc'); > SELECT array_sort('{abc DEF 123abc

Re: Row pattern recognition

2024-09-28 Thread Tatsuo Ishii
> With some bigger partitions, I hit an `ERROR: wrong pos: 1024`. A > test that reproduces it is attached. Thanks for the report. Attached is a patch on top of v22 patches to fix the bug. We keep info in an array (WindowAggState.reduced_frame_map) to track the rpr pattern match result status for