Wrong buffer limits check

2024-01-29 Thread Mikhail Gribkov
Hi hackers, I have tried to analyse Postgres code with Svace static analyzer [1] and found something I think is a real bug. In pgp-decrypt.c, in prefix_init function the following check: if (len > sizeof(tmpbuf)) seem to be erroneous and should really look this way: if (len > PGP_MAX_BLOCK)

Re: On login trigger: take three

2023-10-27 Thread Mikhail Gribkov
Hi Alexander, >> Thank you for catching it. Please, post this. Just for a more complete picture of the final state here. I have posted the described fix (for avoiding race condition in the tests) separately: https://commitfest.postgresql.org/45/4616/ -- best regards, Mikhail A. Gribkov

Avoid race condition for event_triggers regress test

2023-10-18 Thread Mikhail Gribkov
Hi hackers, After committing the on-login trigger (e83d1b0c40ccda8955f1245087f0697652c4df86) the event_trigger regress test became sensible to any other parallel tests, not only DDL. Thus it should be placed in a separate parallel schedule group. The current problem is that a race condition may

Re: On login trigger: take three

2023-10-18 Thread Mikhail Gribkov
Hi Alexander, Sorry for my long offline and thanks for the activity. So should we close the patch on the commitfest page now? By the way I had one more issue with the login trigger tests (quite a rare one though). A race condition may occur on some systems, when oidjoins test starts a moment

Re: Permute underscore separated components of columns before fuzzy matching

2023-07-24 Thread Mikhail Gribkov
4-71-12 Telegram: @youzhick On Mon, Jul 17, 2023 at 1:42 AM Arne Roland wrote: > Hello Mikhail, > > I'm sorry. Please try attached patch instead. > > Thank you for having a look! > > Regards > Arne > > -- > *From:* Mikhail Gribkov >

Re: Permute underscore separated components of columns before fuzzy matching

2023-07-06 Thread Mikhail Gribkov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, failed Documentation:tested, failed Hello Arne, The goal of supporting words-switching hints

Re: Permute underscore separated components of columns before fuzzy matching

2023-07-06 Thread Mikhail Gribkov
Hello Arne, The goal of supporting words-switching hints sounds interesting and I've tried to apply your patch. The patch was applied smoothly to the latest master and check-world reported no problems. Although I had problems after trying to test the new functionality. I tried to simply mix

Re: Fixing tab-complete for dollar-names

2023-06-26 Thread Mikhail Gribkov
Hi hackers, As not much preliminary interest seem to be here, I'm sending the patch to the upcoming commitfest -- best regards, Mikhail A. Gribkov On Sat, Jun 17, 2023 at 12:51 AM Mikhail Gribkov wrote: > Hi hackers, > > In modern versions of Postgres the dollar sign is a tota

Fixing tab-complete for dollar-names

2023-06-16 Thread Mikhail Gribkov
Hi hackers, In modern versions of Postgres the dollar sign is a totally legal character for identifiers (except for the first character), but tab-complete do not treat such identifiers well. For example if one try to create an Oracle-style view like this: create view v$activity as select * from

Re: On login trigger: take three

2023-06-14 Thread Mikhail Gribkov
original authors of login EVT left, and the 0001 GUC > patch > extracted into its own thread. That patch now lives at: > > https://commitfest.postgresql.org/42/4013/ > > This thread was then later revived by Mikhail Gribkov but without 0001 > instead > referri

Re: On login trigger: take three

2023-03-15 Thread Mikhail Gribkov
Hi Gregory, Thanks for the note. The problem was that the patch was not aware of yesterday Tom Lane's changes in the test. It's fixed now: the attached v39 patch contains the updated version along with the freshest rebase on master branch. -- best regards, Mikhail A. Gribkov e-mail:

Re: GUC for temporarily disabling event triggers

2023-03-07 Thread Mikhail Gribkov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed I like it now. * The patch does what it intends to do; *

Re: On login trigger: take three

2023-03-01 Thread Mikhail Gribkov
Hi hackers, The attached v38 patch is a fresh rebase on master branch. Nothing has changed beyond rebasing. And just for convenience, here is a link to the exact message of the thread describing the current approach:

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-29 Thread Mikhail Gribkov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, failed Documentation:tested, passed Hi Christoph, The patch have a potential, although I have

Re: GUC for temporarily disabling event triggers

2023-01-27 Thread Mikhail Gribkov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Hi Daniel, I have reviewed the patch and I liked it (well I

Re: On login trigger: take three

2023-01-20 Thread Mikhail Gribkov
Hi Pavel, On Mon, Jan 16, 2023 at 9:10 AM Pavel Stehule wrote: > > > ne 15. 1. 2023 v 7:32 odesílatel Pavel Stehule > napsal: > >> Hi >> >> >>> On Thu, Jan 12, 2023 at 9:51 AM Pavel Stehule >>> wrote: >>> Hi I checked this patch and it looks well. All tests passed. Together

Re: On login trigger: take three

2023-01-14 Thread Mikhail Gribkov
Hi Pavel, Thanks for pointing out the tests. I completely agree that using an exception inside on-login trigger should be tested. It cannot be done via regular *.sql/*.out regress tests, thus I have added another perl test to authentication group doing this. Attached v36 patch contains this test

Re: On login trigger: take three

2022-12-19 Thread Mikhail Gribkov
, Dec 17, 2022 at 3:29 PM Ted Yu wrote: > > > On Sat, Dec 17, 2022 at 3:46 AM Mikhail Gribkov > wrote: > >> Hi Nikita, >> >> > Mikhail, I've checked the patch and previous discussion, >> > the condition mentioned earlier is still actual: >> >> Thanks

Re: On login trigger: take three

2022-12-17 Thread Mikhail Gribkov
Hi Nikita, > Mikhail, I've checked the patch and previous discussion, > the condition mentioned earlier is still actual: Thanks for pointing this out! My bad, I forgot to fix the documentation example. Attached v34 has this issue fixed, as well as a couple other problems with the example code.

Re: On login trigger: take three

2022-12-16 Thread Mikhail Gribkov
Hi hackers, Attached v33 is a new rebase of the flagless version of the patch. As there were no objections at first glance, I’ll try to post it to the upcoming commitfest, thus the brief recap of all the patch details is below. v33-On_client_login_event_trigger The patch introduces a trigger on

Re: On login trigger: take three

2022-11-22 Thread Mikhail Gribkov
Hi hackers, Since the original authors, as Daniel said, seems to have retired from the patch, I have allowed myself to continue the patch polishing. Attached v32 includes fresh rebase and the following fixes: - Copying dathasloginevt flag during DB creation from template; - Restoring

Re: Nicely exiting PG_TRY and PG_CATCH

2022-10-20 Thread Mikhail Gribkov
gt;* http://www.strava.com/athletes/5085772 phone: +7(916)604-71-12 Telegram: @youzhick On Sat, Oct 8, 2022 at 12:19 AM Tom Lane wrote: > Mikhail Gribkov writes: > > Usually it's not a good idea to exit PG_TRY() block via return statement. > > Otherwise it would leave PG_excepti

Nicely exiting PG_TRY and PG_CATCH

2022-10-07 Thread Mikhail Gribkov
Hi hackers, I've found some odd lines in plpython-related code. These look to me like a potential source of problems, but maybe I'm not fully aware of some nuances. Usually it's not a good idea to exit PG_TRY() block via return statement. Otherwise it would leave PG_exception_stack global