Surely this code in setrefs.c is wrong?

2023-09-09 Thread Tom Lane
I happened to notice this bit in fix_expr_common's processing of ScalarArrayOpExprs: set_sa_opfuncid(saop); record_plan_function_dependency(root, saop->opfuncid); if (!OidIsValid(saop->hashfuncid)) record_plan_function_dependency(root, saop->hashfuncid);

Re: BUG #18097: Immutable expression not allowed in generated at

2023-09-09 Thread Tom Lane
I wrote: > After digging around, I could only find one other place where > outside-the-planner code was doing this wrong: AddRelationNewConstraints > can come to the wrong conclusion about whether it's safe to use > missingMode. So here's a patch series to resolve this. Argh ... I forgot to menti

Re: [PATCH] Add inline comments to the pg_hba_file_rules view

2023-09-09 Thread Jim Jones
Hi David On 09.09.23 01:52, David Zhang wrote: This is a very useful feature. I applied the patch to the master branch, and both make check and make check-world passed without any issues. Thanks for reviewing this patch! Since "only the first #" and "any leading spaces" are removed, IMO,

Re: Add const qualifiers

2023-09-09 Thread David Steele
On 9/1/23 11:39, David Steele wrote: Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c and that led me to use ^static const.*\*.*= to do a quick search for similar cases.

Re: BUG #18097: Immutable expression not allowed in generated at

2023-09-09 Thread Tom Lane
[ moving to pgsql-hackers ] I wrote: > Applying expression_planner() solves the problem because it inlines > anytextcat(anynonarray,text), resolving that the required cast is > numeric->text which is immutable. The code for generated expressions > omits that step and arrives at the less desirable

Re: Possibility to disable `ALTER SYSTEM`

2023-09-09 Thread Alvaro Herrera
On 2023-Sep-08, Magnus Hagander wrote: > Now, it might be that you don't care at all about the *security* side > of the feature, and only care about the convenience side. But in that > case, the original suggestion from Tom of using an even trigger seems > like a fine enough solution? ALTER SYSTE

Re: Row pattern recognition

2023-09-09 Thread Vik Fearing
On 9/9/23 13:21, Tatsuo Ishii wrote: Thanks for the explanation. Surprising concet of the standard:-) This leaves the choice between traditional NFA and Posix NFA. The difference between these is that a traditional NFA exits (declares a match) as soon as it finds the first possible match,

Re: Suspicious redundant assignment in COPY FROM

2023-09-09 Thread Michael Paquier
On Fri, Sep 08, 2023 at 01:54:51PM +0800, Jingtang Zhang wrote: > Agreed with this principle. Patch is modified and attached. Done as of e434e21e1. -- Michael signature.asc Description: PGP signature

Re: Row pattern recognition

2023-09-09 Thread Tatsuo Ishii
Hi, >> But: >> >> UP AS price > PREV(price) >> >> also depends on previous row, no? > > PREV(CLASSIFIER()) depends not on the value of the previous row but the > state of the match so far. To take an example from the patch: > >> * Example: >> * str_set[0] = "AB"; >> * str_set[1] = "AC"; >> * I

Re: lockup in parallel hash join on dikkop (freebsd 14.0-current)

2023-09-09 Thread Alexander Lakhin
Hi Thomas, 08.09.2023 22:39, Thomas Munro wrote: With debugging logging added I see (on 7389aad63~1) that one process really sends SIGURG to another, and the latter reaches poll(), but it just got no signal, it's signal handler not called and poll() just waits... Thanks for working so hard on t

Re: SQL:2011 application time

2023-09-09 Thread jian he
hi I am confused by (pk,fk) on delete on update (restriction and no action) result based on v13. related post: https://stackoverflow.com/questions/14921668/difference-between-restrict-and-no-action Please check the following test and comments. ---common setup for test0, test1,test2,test3 BEGIN; D