Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Gurjeet Singh
(reposting the same review, with many grammatical fixes) On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand wrote: > Please find attached v2-0004-connection_hooks.patch /* * Stop here if it was bad or a cancel packet. ProcessStartupPacket * already did any appropriate error

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Gurjeet Singh
On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand wrote: > Please find attached v2-0004-connection_hooks.patch /* * Stop here if it was bad or a cancel packet. ProcessStartupPacket * already did any appropriate error reporting. */ if (status != STATUS_OK) +{

Re: Include the dependent extension information in describe command.

2022-08-13 Thread Tom Lane
vignesh C writes: > Currently we do not include the dependent extension information for > index and materialized view in the describe command. I felt it would > be useful to include this information as part of the describe command > like: > \d+ idx_depends > Index

Re: Asynchronous execution support for Custom Scan

2022-08-13 Thread Kazutaka Onishi
v1 patch occurs gcc warnings, I fixed it. 2022年8月13日(土) 22:42 Kazutaka Onishi : > > Hello, > > I suggest supporting asynchronous execution for Custom Scan. > Since v14, PostgreSQL supports asynchronous execution for Foreign Scan. > This patch enables asynchronous execution by applying the process

Re: Suggestion: optionally return default value instead of error on failed cast

2022-08-13 Thread Mark Simon
PostgreSQL is the only popular DBMS (define popular?) which doesn’t have a friendly alternative. I asked about it on Stack (https://dba.stackexchange.com/questions/203934/postgresql-alternative-to-sql-server-s-try-cast-function/311980#311980), and ended up with the following:     DROP

Tab completion for "ALTER TYPE typename SET" and rearranged "Alter TYPE typename RENAME"

2022-08-13 Thread vignesh C
Hi, This patch does a couple of things: a) Tab completion for "ALTER TYPE typename SET" was missing. Added tab completion for the same. b) Tab completion for "ALTER TYPE RENAME VALUE" was not along with tab completion of "ALTER TYPE" commands, it was present after "ALTER GROUP ", rearranged

Include the dependent extension information in describe command.

2022-08-13 Thread vignesh C
Hi, Currently we do not include the dependent extension information for index and materialized view in the describe command. I felt it would be useful to include this information as part of the describe command like: \d+ idx_depends Index "public.idx_depends" Column | Type |

Re: SELECT documentation

2022-08-13 Thread Tom Lane
Bruce Momjian writes: > Hi, I agree we should show the more modern JOIN sytax. However, this is > just an example, so one example should be sufficient. I went with the > first one in the attached patch. You should not remove the CROSS JOIN mention at l. 604, first because the references to it

Re: SELECT documentation

2022-08-13 Thread Bruce Momjian
On Thu, Dec 30, 2021 at 12:11:26AM +0100, Joel Jacobson wrote: > Hi, > > The Examples section in the documentation for the SELECT command [1] > only contains a single example on how to join two tables, > which is written in SQL-89 style: > > SELECT f.title, f.did, d.name, f.date_prod, f.kind >

Re: Cleaning up historical portability baggage

2022-08-13 Thread Andres Freund
Hi, On 2022-08-14 10:03:19 +1200, Thomas Munro wrote: > I hadn't paid attention to our existing abstract Unix socket support > before and now I'm curious: do we have a confirmed sighting of that > working on Windows? I vaguely remember successfully trying it in the past. But I just tried it

Re: Cleaning up historical portability baggage

2022-08-13 Thread Thomas Munro
On Sun, Aug 14, 2022 at 6:07 AM Tom Lane wrote: > Thomas Munro writes: > > I pushed these, except I chopped out the HAVE_UNIX_SOCKETS part as > > requested. Here it is in a separate patch, with a commit message that > > explains the rationale (essentially, what you said, it's basically a > >

Re: [patch]HashJoin crash

2022-08-13 Thread Tom Lane
Zhang Mingli writes: > In ExecChooseHashTableSize(), commit b154ee63bb uses func pg_nextpower2_size_t > whose param must not be 0. Right. Fix pushed, thanks. regards, tom lane

Goodbye Windows XP

2022-08-13 Thread Andrew Dunstan
For some time I have been nursing along my old Windows XP instance, which nowadays only builds release 10, which is due to go to EOL in a few months. The machine has suddenly started having issues with git, and I'm not really inclined to spend lots of time fixing it. XP itself is now a very long

Re: [patch]HashJoin crash

2022-08-13 Thread Justin Pryzby
+ Tom Lane On Fri, Aug 12, 2022 at 11:05:06PM +0800, Zhang Mingli wrote: > I got a coredump when using hash join on a Postgres derived > Database(Greenplum DB). > And I find a way to reproduce it on Postgres. > > Root cause: > > In ExecChooseHashTableSize(), commit b154ee63bb uses func

Re: Cleaning up historical portability baggage

2022-08-13 Thread Tom Lane
Thomas Munro writes: > I pushed these, except I chopped out the HAVE_UNIX_SOCKETS part as > requested. Here it is in a separate patch, with a commit message that > explains the rationale (essentially, what you said, it's basically a > runtime matter for a hypothetical AF_UNIX-less system to

Asynchronous execution support for Custom Scan

2022-08-13 Thread Kazutaka Onishi
Hello, I suggest supporting asynchronous execution for Custom Scan. Since v14, PostgreSQL supports asynchronous execution for Foreign Scan. This patch enables asynchronous execution by applying the process for Foreign Scan to Custom Scan . The patch is divided into 2 parts, source and

Re: Cleaning up historical portability baggage

2022-08-13 Thread Thomas Munro
On Sun, Aug 14, 2022 at 12:23 AM Thomas Munro wrote: > Remove HAVE_UNIX_SOCKETS. > Remove configure probe for struct sockaddr_storage. > Remove configure probe for getaddrinfo, and replacement code. Plus one more that falls out of the above (it was only used by src/port/getaddrinfo.c):

Re: Cleaning up historical portability baggage

2022-08-13 Thread Thomas Munro
On Fri, Aug 12, 2022 at 8:03 PM Thomas Munro wrote: > On Fri, Aug 12, 2022 at 7:15 PM Peter Eisentraut > wrote: > > But maybe it would be better to make that a separate patch from the > > sys/un.h configure changes, just so there is more clarity around it. > > Cool, I'll do that. I pushed

Re: Add lasterrno setting for dir_existsfile()

2022-08-13 Thread Bharath Rupireddy
On Sat, Aug 13, 2022 at 4:34 AM Bruce Momjian wrote: > > On Fri, Aug 12, 2022 at 06:22:01PM -0400, Bruce Momjian wrote: > > On Mon, Jan 10, 2022 at 12:19:28AM +0800, Wei Sun wrote: > > > Hi, > > > > > > Some time ago,the following patch clean up error handling in > > > pg_basebackup's > > >

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Bharath Rupireddy
On Tue, Aug 2, 2022 at 6:55 PM Drouvot, Bertrand wrote: > > Hi Bharath, > > On 7/14/22 11:43 AM, Bharath Rupireddy wrote: > > On Fri, Jul 8, 2022 at 5:54 PM Bharath Rupireddy > > wrote: > >> Looking at v2-0003 patch and emit_log_hook, how about we filter out > >> for those connectivity errors

Re: build remaining Flex files standalone

2022-08-13 Thread John Naylor
Here are the rest. Most of it was pretty straightforward, with the main exception of jsonpath_scan.c, which is not quite finished. That one passes tests but still has one compiler warning. I'm unsure how much of what is there already is really necessary or was cargo-culted from elsewhere without